-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1dbd05b
Showing
43 changed files
with
5,363 additions
and
0 deletions.
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,11 @@ | ||
/ckpt | ||
/.env | ||
/global_opts.json | ||
*.pyc | ||
.vscode | ||
*.jpg | ||
*.png | ||
*.pth | ||
*.h5 | ||
screenlog.* | ||
/faiss |
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,104 @@ | ||
FROM nvidia/cuda:9.2-base-ubuntu16.04 | ||
|
||
# Install some basic utilities | ||
RUN apt-get update && apt-get install -y \ | ||
curl \ | ||
ca-certificates \ | ||
sudo \ | ||
git \ | ||
bzip2 \ | ||
libx11-6 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Create a working directory | ||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
# Create a non-root user and switch to it | ||
RUN adduser --disabled-password --gecos '' --shell /bin/bash user \ | ||
&& chown -R user:user /app | ||
RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user | ||
USER user | ||
|
||
# All users can use /home/user as their home directory | ||
ENV HOME=/home/user | ||
RUN chmod 777 /home/user | ||
|
||
# Install Miniconda | ||
RUN curl -so ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-4.5.1-Linux-x86_64.sh \ | ||
&& chmod +x ~/miniconda.sh \ | ||
&& ~/miniconda.sh -b -p ~/miniconda \ | ||
&& rm ~/miniconda.sh | ||
ENV PATH=/home/user/miniconda/bin:$PATH | ||
ENV CONDA_AUTO_UPDATE_CONDA=false | ||
|
||
# Create a Python 3.6 environment | ||
RUN /home/user/miniconda/bin/conda install conda-build \ | ||
&& /home/user/miniconda/bin/conda create -y --name py36 python=3.6.5 \ | ||
&& /home/user/miniconda/bin/conda clean -ya | ||
ENV CONDA_DEFAULT_ENV=py36 | ||
ENV CONDA_PREFIX=/home/user/miniconda/envs/$CONDA_DEFAULT_ENV | ||
ENV PATH=$CONDA_PREFIX/bin:$PATH | ||
|
||
# CUDA 9.2-specific steps | ||
RUN conda install -y -c pytorch \ | ||
cuda92=1.0 \ | ||
magma-cuda92=2.3.0 \ | ||
"pytorch=0.4.1=py36_cuda9.2.148_cudnn7.1.4_1" \ | ||
torchvision=0.2.1 \ | ||
&& conda clean -ya | ||
|
||
# Install HDF5 Python bindings | ||
RUN conda install -y h5py=2.8.0 \ | ||
&& conda clean -ya | ||
RUN pip install h5py-cache==1.0 | ||
|
||
# Install Torchnet, a high-level framework for PyTorch | ||
RUN pip install torchnet==0.0.4 | ||
|
||
# Install Requests, a Python library for making HTTP requests | ||
RUN conda install -y requests=2.19.1 \ | ||
&& conda clean -ya | ||
|
||
# Install Graphviz | ||
RUN conda install -y graphviz=2.38.0 \ | ||
&& conda clean -ya | ||
RUN pip install graphviz==0.8.4 | ||
|
||
# Install OpenCV3 Python bindings | ||
RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ | ||
libgtk2.0-0 \ | ||
libcanberra-gtk-module \ | ||
&& sudo rm -rf /var/lib/apt/lists/* | ||
RUN conda install -y -c menpo opencv3=3.1.0 \ | ||
&& conda clean -ya | ||
|
||
# Install Jupyter Notebook | ||
#RUN pip install jupyter | ||
|
||
#Install tensorboardX | ||
RUN pip install tensorboardX | ||
|
||
#Install skicit-image | ||
RUN pip install scikit-image | ||
|
||
# Set up our notebook config. | ||
#COPY jupyter_notebook_config.py /root/.jupyter/ | ||
|
||
# Jupyter has issues with being run directly: | ||
# https://github.com/ipython/ipython/issues/7062 | ||
# We just add a little wrapper script. | ||
#COPY run_jupyter.sh / | ||
|
||
# TensorBoard | ||
EXPOSE 6006 | ||
# IPython | ||
#EXPOSE 8888 | ||
|
||
# install faiss | ||
RUN conda install faiss-gpu cuda92 -c pytorch \ | ||
&& conda clean -ya | ||
|
||
# Set the default command to python3 | ||
# CMD ["python3"] | ||
CMD ["/bin/bash"] |
Oops, something went wrong.