-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
40 lines (31 loc) · 1.21 KB
/
Dockerfile
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
35
36
37
38
39
40
# Based on https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/dockerfiles/dockerfiles/cpu.Dockerfile
FROM ubuntu:16.04
LABEL description="PyTorch / Python 3 / ubuntu16.04" \
maintainer="https://github.com/rlan/notebooks"
# Build-time metadata as defined at http://label-schema.org
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/rlan/notebooks" \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0"
ARG PYTHON=python3
ARG PIP=pip3
# See http://bugs.python.org/issue19846
ENV LANG C.UTF-8
RUN apt-get update && apt-get install -y \
${PYTHON} \
${PYTHON}-pip \
&& apt-get -qq clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Make python run python3
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 100
RUN ${PIP} --no-cache-dir install --upgrade \
pip \
setuptools
RUN ${PIP} --no-cache-dir install --upgrade \
https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp35-cp35m-linux_x86_64.whl \
&& ${PIP} --no-cache-dir install --upgrade \
torchvision