-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify your start #16
Open
Rinatum
wants to merge
2
commits into
nv-tlabs:master
Choose a base branch
from
Rinatum:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Approximately 10 min to build | ||
|
||
FROM nvidia/cuda:10.2-cudnn7-devel | ||
# Python | ||
ARG python_version=3.7 | ||
ARG SSH_PASSWORD=password | ||
ARG SSH_PUBLIC_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCojldgho9VK4WaCbSjBAPr9i6daYdQ5s9uGpVuXLI6cAKtzT8G9AQg+wYZayYNthexuzmp5BwpyJT8QQTsUUgBuaocSAjZff8uFKNN9yVMVtT8RIYw/NVVkb97ZPx3ZxN2e7m6BlJyKNg8jKOw4qiUMCH70wYprjEKVUzEjJnM7Mq/BnJPYJr+DQG7IE9uGJwGiE7gHAatsECkcg+QcrMHpLwtha91VE/U13C5dSE072mAX50QnWSGZV2SGg+o8AJViwixJCNMZhld6thClmFezYJjsb9Uz1Hss6xatntxIjUmjL2Lyc/uWFiep+0/R5GPQ9Tbq929IpZ1DwbW5J0x rinatmullahmetov@Rinats-MacBook-Pro.local" | ||
|
||
|
||
# https://docs.docker.com/engine/examples/running_ssh_service/ | ||
# Last is SSH login fix. Otherwise user is kicked off after login | ||
RUN apt-get update && apt-get install -y openssh-server && \ | ||
mkdir /var/run/sshd && echo "root:$SSH_PASSWORD" | chpasswd && \ | ||
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \ | ||
sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd && \ | ||
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config && \ | ||
echo "export VISIBLE=now" >> /etc/profile && \ | ||
mkdir /root/.ssh && chmod 700 /root/.ssh && \ | ||
echo "$SSH_PUBLIC_KEY" >> /root/.ssh/authorized_keys && \ | ||
chmod 644 /root/.ssh/authorized_keys | ||
|
||
ENV NOTVISIBLE "in users profile" | ||
ENV CONDA_DIR /opt/conda | ||
ENV PATH $CONDA_DIR/bin:$PATH | ||
|
||
# writing env variables to /etc/profile as mentioned here: | ||
# https://docs.docker.com/engine/examples/running_ssh_service/#environment-variables | ||
RUN echo "export CONDA_DIR=$CONDA_DIR" >> /etc/profile && \ | ||
echo "export PATH=$CONDA_DIR/bin:$PATH" >> /etc/profile && \ | ||
echo "export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> /etc/profile && \ | ||
echo "export LIBRARY_PATH=/usr/local/cuda/lib64:/lib/x86_64-linux-gnu:$LIBRARY_PATH" >> /etc/profile && \ | ||
echo "export CUDA_HOME=/usr/local/cuda" >> /etc/profile | ||
|
||
# Install Miniconda | ||
RUN mkdir -p $CONDA_DIR && \ | ||
apt-get update && \ | ||
apt-get install -y wget git vim htop zip libhdf5-dev g++ graphviz libgtk2.0-dev \ | ||
openmpi-bin nano cmake libopenblas-dev liblapack-dev libx11-dev && \ | ||
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ | ||
/bin/bash /Miniconda3-latest-Linux-x86_64.sh -f -b -p $CONDA_DIR && \ | ||
ln /usr/lib/x86_64-linux-gnu/libcudnn.so /usr/local/cuda/lib64/libcudnn.so && \ | ||
ln /usr/lib/x86_64-linux-gnu/libcudnn.so.7 /usr/local/cuda/lib64/libcudnn.so.7 && \ | ||
ln /usr/include/cudnn.h /usr/local/cuda/include/cudnn.h && \ | ||
rm Miniconda3-latest-Linux-x86_64.sh | ||
|
||
# Install Data Science essential | ||
RUN conda config --set remote_read_timeout_secs 100000.0 && \ | ||
conda update openssl ca-certificates certifi && \ | ||
conda install -y python=${python_version} && \ | ||
pip install --upgrade pip --timeout=1000 && \ | ||
pip install --upgrade requests --timeout=1000 && \ | ||
conda install Pillow scikit-learn pandas matplotlib mkl nose pyyaml six && \ | ||
pip install opencv-contrib-python requests scipy tqdm --timeout=1000 && \ | ||
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch && \ | ||
pip install pydantic graphviz hiddenlayer torchsummary --timeout=1000 && \ | ||
pip install albumentations --timeout=1000 && \ | ||
conda install -c anaconda jupyter && \ | ||
conda install -c conda-forge jupyterlab && \ | ||
pip install git+https://github.com/ipython-contrib/jupyter_contrib_nbextensions --timeout=1000 && \ | ||
jupyter contrib nbextension install && \ | ||
conda clean -yt | ||
|
||
# Install NVIDIA Apex | ||
RUN git clone https://github.com/NVIDIA/apex && cd apex && \ | ||
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./ && \ | ||
cd .. && rm -r apex | ||
|
||
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64:/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH | ||
ENV LIBRARY_PATH /usr/local/cuda/lib64:/lib/x86_64-linux-gnu:$LIBRARY_PATH | ||
ENV CUDA_HOME /usr/local/cuda | ||
|
||
COPY requirements.txt /jumanji/requirements.txt | ||
RUN pip install -r /jumanji/requirements.txt | ||
|
||
COPY . /jumanji | ||
|
||
EXPOSE 8888 6006 22 | ||
ENTRYPOINT ["/usr/sbin/sshd"] | ||
CMD ["-D"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
torch==1.4.0 | ||
torchvision==0.5.0 | ||
scipy==1.5.4 | ||
opencv-python==4.5.2.54 | ||
tqdm==4.61.1 | ||
Pillow==8.3.0 | ||
imageio==2.9.0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there ✋🏼,
I have run the
train_interpreter.py
file from this repo usingtorch
andtorchvision
latest versions.To do so, I have changed these two lines by:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, Thank you
I didn't test this torch/torchvision versions because
torch==1.4.0
torchvision==0.5.0
were added by original author of this repo
Also you need to update Dockerfile to use cuda/cudann suitable for versions 1.9.0 and 0.10.0
Do you think the changes you proposed are needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not really sure if these changes affect another functionality of this repo. So, I wouldn't include them directly.
However, from my point of view, I would try to update these versions to the latest PyTorch versions to avoid future problems (just like the "imsave" function was deprecated). Moreover, the use of recent versions would mean greater support from the PyTorch community.