tsurumeso / waifu2x-chainer

Chainer implementation of waifu2x
MIT License
165 stars 54 forks source link

[Question] how to build Waifu2x-chainer on Gcloud VM instance correctly? #16

Closed ghost closed 5 years ago

ghost commented 5 years ago

Before I ask, thank you to Tsurumeso who has solved my Issues. I tried to build Waifu2x-chainer on Gcloud, but it does not work. Does anyone ever try to make it on Gcloud?

here my attempt:

Do you want to continue (Y/n)? y

Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/ucok66/.ssh/google_compute_engine. Your public key has been saved in /home/ucok66/.ssh/google_compute_engine.pub. The key fingerprint is: SHA256:q2WW2wutVquuYd++yOkP7b4+dkapywu7LdRo+R8I1ho ucok66@ucok66 The key's randomart image is: +---[RSA 2048]----+
.
E+. .
.=Oo.o
oo@o++.
. Oo/* o.
o=&X^@.

+----[SHA256]-----+ Updating project ssh metadata...⠛Updated [https://www.googleapis.com/compute/v1/projects/vigilant-guru-237109].
Updating project ssh metadata...done.
Waiting for SSH key to propagate. Warning: Permanently added 'compute.4483393792698769101' (ECDSA) to the list of known hosts. Enter passphrase for key '/home/ucok66/.ssh/google_compute_engine': Enter passphrase for key '/home/ucok66/.ssh/google_compute_engine':

Welcome to the Google Deep Learning VM

Version: m22 Based on: Debian GNU/Linux 9.8 (stretch) (GNU/Linux 4.9.0-8-amd64 x86_64\n)

Resources:

To reinstall Nvidia driver (if needed) run: sudo /opt/deeplearning/install-driver.sh Linux instance-1 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. ucok66@instance-1:~$ pws -bash: pws: command not found ucok66@instance-1:~$ pwd /home/ucok66 ucok66@instance-1:~$ pip install chainer Collecting chainer Downloading https://files.pythonhosted.org/packages/12/ed/8b923bc28345c5b3e53358ba7e5e09b02142fc612378fd90986cf40073ef/chainer-5.4.0.tar.gz (525kB) 100% |████████████████████████████████| 532kB 2.3MB/s Collecting filelock (from chainer) Downloading https://files.pythonhosted.org/packages/2a/bd/6a87635dba4906ae56377b22f64805b2f00d8cafb26e411caaf3559a5475/filelock-3.0.10.tar.gz Requirement already satisfied: numpy>=1.9.0 in /usr/local/lib/python2.7/site-packages (from chainer) Requirement already satisfied: protobuf>=3.0.0 in /usr/local/lib/python2.7/dist-packages (from chainer) Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python2.7/dist-packages (from chainer) Requirement already satisfied: mkl-random in /usr/local/lib/python2.7/dist-packages (from numpy>=1.9.0->chainer) Requirement already satisfied: mkl-fft in /usr/local/lib/python2.7/dist-packages (from numpy>=1.9.0->chainer) Requirement already satisfied: mkl in /usr/local/lib/python2.7/dist-packages (from numpy>=1.9.0->chainer) Requirement already satisfied: tbb4py in /usr/local/lib/python2.7/dist-packages (from numpy>=1.9.0->chainer) Requirement already satisfied: icc-rt in /usr/local/lib/python2.7/dist-packages (from numpy>=1.9.0->chainer) Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from protobuf>=3.0.0->chainer) Requirement already satisfied: intel-numpy in /usr/local/lib/python2.7/dist-packages (from mkl-random->numpy>=1.9.0->chainer) Requirement already satisfied: intel-openmp in /usr/local/lib/python2.7/dist-packages (from mkl->numpy>=1.9.0->chainer) Requirement already satisfied: tbb==2019.* in /usr/local/lib/python2.7/dist-packages (from tbb4py->numpy>=1.9.0->chainer) Building wheels for collected packages: chainer, filelock Running setup.py bdist_wheel for chainer ... done Stored in directory: /home/ucok66/.cache/pip/wheels/eb/18/d2/5e85cbd7f32026e5e72cc466a5a17fd1939e99ffeeaaea267b Running setup.py bdist_wheel for filelock ... done Stored in directory: /home/ucok66/.cache/pip/wheels/46/b3/26/8803692ec1f1729fcf201583b5de74f112da1f1488f36e47b0 Successfully built chainer filelock Installing collected packages: filelock, chainer Successfully installed chainer-5.4.0 filelock-3.0.10 ucok66@instance-1:~$ pip install pillow Collecting pillow Downloading https://files.pythonhosted.org/packages/b6/4b/5adc1109908266554fb978154c797c7d71aba43dd15508d8c1565648f6bc/Pillow-6.0.0-cp27-cp27mu-manylinux1_x86_64.whl (2.0MB) 100% |████████████████████████████████| 2.0MB 599kB/s Installing collected packages: pillow Successfully installed pillow-6.0.0 ucok66@instance-1:~$ git clone https://github.com/tsurumeso/waifu2x-chainer.git Cloning into 'waifu2x-chainer'... remote: Enumerating objects: 6, done. remote: Counting objects: 100% (6/6), done. remote: Compressing objects: 100% (5/5), done. remote: Total 1416 (delta 2), reused 3 (delta 1), pack-reused 1410 Receiving objects: 100% (1416/1416), 183.44 MiB | 37.27 MiB/s, done. Resolving deltas: 100% (795/795), done. ucok66@instance-1:~$ mkdir material1 ucok66@instance-1:~$ mkdir waifu1 ucok66@instance-1:~$ ls material1 waifu1 waifu2x-chainer ucok66@instance-1:~$ pwd /home/ucok66 ucok66@instance-1:~$ ls material1 waifu1 waifu2x-chainer ucok66@instance-1:~$ pwd /home/ucok66 ucok66@instance-1:~$ cd waifu2x-chainer ucok66@instance-1:~/waifu2x-chainer$ python waifu2x.py -a 3 -e webp -t -T 4 -m noise_scale -s 4 -n 2 -i /home/ucok66/material1 -o /home/ucok66/waifu1 ucok66@instance-1:~/waifu2x-chainer$ python waifu2x.py -a 3 -e webp -t -T 4 -m noise_scale -s 4 -n 2 -i ~/material1 -o ~/waifu1

and this is how I upload the images:

~ >>> gcloud compute scp --recurse /home/ucok66/material/1/ ucok66@instance-1:/home/ucok66/material1 [1] No zone specified. Using zone [us-east1-b] for instance: [instance-1]. Enter passphrase for key '/home/ucok66/.ssh/google_compute_engine': 1128308.jpg 100% 2165KB 358.4KB/s 00:06
1482332048.png 100% 248KB 266.5KB/s 00:00
1038214.jpg 100% 1030KB 340.8KB/s 00:03
1038220.jpg 100% 1058KB 348.4KB/s 00:03
1038219.jpg 100% 546KB 335.8KB/s 00:01



See, nothing happens when I enter the command. Does anyone has been successful when tried to build Waifu2x-chainer on Gcloud?