-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_cuda
34 lines (30 loc) · 1020 Bytes
/
Dockerfile_cuda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# FROM ubuntu:18.04
FROM nvidia/cuda:11.4.1-devel-ubuntu20.04
ARG PYTHON=python3.7
ENV DEBIAN_FRONTEND=noninteractive
ENV CFLAGS='-g0 -Wl,--strip-all -O2' CXXFLAGS='-g0 -Wl,--strip-all -O2'
RUN apt-get update && apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
software-properties-common \
bash-completion \
wget \
curl \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update && apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
${PYTHON}-minimal \
lib${PYTHON}-stdlib \
${PYTHON}-distutils \
${PYTHON}-dev \
&& wget https://bootstrap.pypa.io/get-pip.py \
&& ${PYTHON} get-pip.py \
&& ln -sf /usr/bin/${PYTHON} /usr/local/bin/python3 \
&& ln -sf /usr/local/bin/pip /usr/local/bin/pip3 \
&& pip3 --no-cache-dir install --upgrade \
pip \
setuptools \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
RUN ln -s $(which ${PYTHON}) /usr/local/bin/python