From 088c921d6c07d33148bdd9672a86caf30d8af42c Mon Sep 17 00:00:00 2001 From: Kaustav Mukherjee Date: Fri, 3 Jan 2020 21:01:33 +0530 Subject: [PATCH 1/2] Corrected the command to refer to v1 as directory changed Corrected the command to refer to v1 as directory changed from v1beta to v1 --- examples/mnist/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/mnist/README.md b/examples/mnist/README.md index 900059f44..6ec2c4a20 100644 --- a/examples/mnist/README.md +++ b/examples/mnist/README.md @@ -21,5 +21,5 @@ NOTE: If you you are working on Power System, Dockerfile.ppc64le could be used. The below example uses the gloo backend. ```shell -kubectl create -f ./v1beta1/pytorch_job_mnist_gloo.yaml +kubectl create -f ./v1/pytorch_job_mnist_gloo.yaml ``` From c42551774d8c575f883581c5daf4686a9322b0fc Mon Sep 17 00:00:00 2001 From: MATRIX4284 Date: Fri, 3 Jan 2020 21:14:13 +0530 Subject: [PATCH 2/2] 01 --- pytorch_cuda_docker/Dockerfile | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 pytorch_cuda_docker/Dockerfile diff --git a/pytorch_cuda_docker/Dockerfile b/pytorch_cuda_docker/Dockerfile new file mode 100644 index 000000000..596a9907f --- /dev/null +++ b/pytorch_cuda_docker/Dockerfile @@ -0,0 +1,54 @@ +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 /var + +# Create a non-root user and switch to it + + +# All users can use /home/user as their home directory +ENV HOME=/var +RUN chmod 777 /var + +# Install Miniconda +RUN curl -so ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh \ + && chmod +x ~/miniconda.sh \ + && ~/miniconda.sh -b -p ~/miniconda \ + && rm ~/miniconda.sh +ENV PATH=/var/miniconda/bin:$PATH +ENV CONDA_AUTO_UPDATE_CONDA=false + +# Create a Python 3.6 environment +RUN /var/miniconda/bin/conda create -y --name py36 python=3.6.9 \ + && /var/miniconda/bin/conda clean -ya +ENV CONDA_DEFAULT_ENV=py36 +ENV CONDA_PREFIX=/var/miniconda/envs/$CONDA_DEFAULT_ENV +ENV PATH=$CONDA_PREFIX/bin:$PATH +RUN /var/miniconda/bin/conda install conda-build=3.18.9=py36_3 \ + && /var/miniconda/bin/conda clean -ya + +# CUDA 9.2-specific steps +RUN conda install -y -c pytorch \ + cudatoolkit=9.2 \ + "pytorch=1.2.0=py3.6_cuda9.2.148_cudnn7.6.2_0" \ + "torchvision=0.4.0=py36_cu92" \ + && 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