Skip to content

Commit bccd696

Browse files
committed
Halfway done with Dockerfile remember to update the .dockerignore
1 parent 10ada2b commit bccd696

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed

.dockerignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# All the crap cmake generates:
2+
Testing
3+
CMakeFiles
4+
cmake_install.cmake
5+
CTestTestfile.cmake
6+
CMakeLists.txt.user
7+
CMakeCache.txt
8+
9+
# Build files:
10+
Debug
11+
Release
12+
build*
13+
release*
14+
debug*
15+
*.a
16+
*.o
17+
18+
# IDE files:
19+
*.swp

Dockerfile

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
FROM ubuntu:16.04
2+
LABEL authors="Arom Zinhart DeGraca"
3+
4+
# for apt-utils
5+
RUN apt-get update \
6+
&& apt-get install -y apt-utils
7+
8+
# for git
9+
RUN apt-get update \
10+
&& apt-get install -y git
11+
12+
# for wget
13+
RUN apt-get update \
14+
&& apt-get install -y wget \
15+
&& rm -rf /var/lib/apt/lists/*
16+
17+
#for make
18+
RUN apt-get update \
19+
&& apt-get install -y make
20+
21+
#for gcc & g++
22+
RUN apt-get update \
23+
&& apt-get install -y gcc \
24+
&& apt-get install -y g++
25+
26+
# for cmake
27+
RUN cd /root && wget http://www.cmake.org/files/v3.5/cmake-3.5.1.tar.gz && \
28+
tar -xf cmake-3.5.1.tar.gz && cd cmake-3.5.1 && \
29+
./configure && \
30+
make -j "$(nproc)" && \
31+
make install
32+
33+
#Courtesy of NVIDIA CORPORATION <[email protected]>
34+
RUN NVIDIA_GPGKEY_SUM=d1be581509378368edeec8c1eb2958702feedf3bc3d17011adbf24efacce4ab5 && \
35+
NVIDIA_GPGKEY_FPR=ae09fe4bbd223a84b2ccfce3f60f4b3d7fa2af80 && \
36+
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub && \
37+
apt-key adv --export --no-emit-version -a $NVIDIA_GPGKEY_FPR | tail -n +5 > cudasign.pub && \
38+
echo "$NVIDIA_GPGKEY_SUM cudasign.pub" | sha256sum -c --strict - && rm cudasign.pub && \
39+
echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \
40+
echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list
41+
42+
ENV CUDA_VERSION 9.0.176
43+
44+
ENV CUDA_PKG_VERSION 9-0=$CUDA_VERSION-1
45+
RUN apt-get update && apt-get install -y --no-install-recommends \
46+
cuda-cudart-$CUDA_PKG_VERSION && \
47+
ln -s cuda-9.0 /usr/local/cuda && \
48+
rm -rf /var/lib/apt/lists/*
49+
50+
# nvidia-docker 1.0
51+
LABEL com.nvidia.volumes.needed="nvidia_driver"
52+
LABEL com.nvidia.cuda.version="${CUDA_VERSION}"
53+
54+
RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
55+
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
56+
57+
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
58+
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
59+
60+
# nvidia-container-runtime
61+
ENV NVIDIA_VISIBLE_DEVICES all
62+
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
63+
ENV NVIDIA_REQUIRE_CUDA "cuda>=9.0"
64+
# END Nvidia
65+
66+
WORKDIR "/root"
67+
CMD ["/bin/bash"]
68+

0 commit comments

Comments
 (0)