[PYTHON] ALDA execution memo

https://github.com/ZJULearning/ALDA

Do this. The data is below. https://github.com/notfolder/svhn

Since it was split, use it by combining with cat.

cat svhn_image.tar.gz.1 svhn_image.tar.gz.2 > svhn_image.tar.gz

pip freeze result

asn1crypto==0.24.0
certifi==2018.1.18
chardet==3.0.4
cryptography==2.1.4
dataclasses==0.7
future==0.18.2
idna==2.6
imageio==2.1.2
keyring==10.6.0
keyrings.alt==3.0
numpy==1.14.6
Pillow==5.3.0
protobuf==3.13.0
pycrypto==2.6.1
pygobject==3.26.1
pyxdg==0.25
requests==2.18.4
SecretStorage==2.3.1
six==1.11.0
ssh-import-id==5.7
tensorboardX==1.4
torch==1.7.0
torchsummary==1.5.1
torchvision==0.8.1
tqdm==4.26.0
typing-extensions==3.7.4.3
urllib3==1.22

This is the Dockerfile. You don't need vscode-server.tgz

FROM nvidia/cuda:10.0-base-ubuntu18.04

#install ssh server
RUN apt-get update && apt-get install -y openssh-server
#It seems that sshd will not start without this
RUN mkdir /var/run/sshd
#Allow ssh root access. However, password access is invalid
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config
#Register the public key on the host side on the image side
COPY id_rsa.pub /root/.ssh/authorized_keys

# add sudo user
RUN groupadd -g 1000 notfolder && \
    useradd  -g      notfolder -G sudo -m -s /bin/bash notfolder

RUN echo 'Defaults visiblepw'             >> /etc/sudoers
RUN echo 'notfolder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

#COPY id_rsa.pub /home/notfolder/.ssh/authorized_keys
RUN mkdir -p /home/notfolder/.ssh
COPY id_rsa.pub /home/notfolder/.ssh/authorized_keys
RUN chown 1000:1000 -R /home/notfolder
RUN chmod 700 /home/notfolder/.ssh

RUN apt-get update && apt-get install -y python3 && \
    apt-get install -y python3-pip && \
    update-alternatives --install /usr/bin/python python /usr/bin/python3 0 && \
    update-alternatives --set python /usr/bin/python3 && \
    update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 0 && \
    update-alternatives --set pip /usr/bin/pip3 && \
    pip install --upgrade pip

COPY vscode-server.tgz /tmp/
RUN tar -zxf /tmp/vscode-server.tgz -C /home/notfolder/

COPY requirements.txt /tmp/
RUN pip install -r /tmp/requirements.txt

EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]

nvidia-smi is below.

$ nvidia-smi
Fri Nov 13 22:46:44 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.80.02    Driver Version: 450.80.02    CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce RTX 2070    Off  | 00000000:04:00.0 Off |                  N/A |
| 29%   35C    P0    20W / 175W |      0MiB /  7982MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Recommended Posts

ALDA execution memo
Python execution time measurement memo
[Memo] Faster R-CNN demo execution
gzip memo
Pandas memo
HackerRank memo
Python memo
python memo
graphene memo
Flask memo
pyenv memo
Matplotlib memo
pytest memo
sed memo
Python memo
Install Memo
BeautifulSoup4 memo
networkx memo
python memo
tomcat memo
command memo
Generator memo.
psycopg2 memo
Python memo
SSH memo
Command memo
Study memo 1_eclipse (python) download, python execution, OpenPyXL download
Memo: rtl8812
pandas memo
Shell memo
Python memo
Pycharm memo
Python memo