Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
67 lines (56 loc) · 1.88 KB
/
Copy pathDockerfile
File metadata and controls
67 lines (56 loc) · 1.88 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# https://hub.docker.com/r/nvidia/cuda
FROM nvidia/cuda:10.2-runtime-ubuntu18.04
LABEL maintainer "NVIDIA CORPORATION <cudatools@nvidia.com>"
RUN apt-get update && apt-get install -y --no-install-recommends \
cuda-nvml-dev-$CUDA_PKG_VERSION \
cuda-command-line-tools-$CUDA_PKG_VERSION \
cuda-libraries-dev-$CUDA_PKG_VERSION \
cuda-minimal-build-$CUDA_PKG_VERSION \
# libnccl-dev \
&& \
rm -rf /var/lib/apt/lists/*
ENV LIBRARY_PATH /usr/local/cuda/lib64/stubs
# https://qiita.com/yagince/items/deba267f789604643bab
ENV DEBIAN_FRONTEND=noninteractive
# https://github.com/phusion/baseimage-docker/issues/319#issuecomment-262550835
RUN apt-get update
RUN apt-get install -y --no-install-recommends apt-utils
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
curl \
tree \
ca-certificates \
libjpeg-dev \
mercurial \
libffi-dev \
libreadline-gplv2-dev \
libncursesw5-dev \
libssl-dev \
libsqlite3-dev \
tk-dev libgdbm-dev \
libc6-dev \
libbz2-dev \
liblzma-dev \
libpng-dev && \
rm -rf /var/lib/apt/lists/*
ENV PYENV_ROOT /root/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
# https://github.com/pyenv/pyenv-installer
RUN curl https://pyenv.run | bash
RUN pyenv install 3.7.4
RUN pyenv global 3.7.4
RUN rm -rf /usr/bin/python* /usr/bin/pip*
COPY . /code
WORKDIR /code
RUN chmod +x /code/train
ENV PATH /code:$PATH
ENV ENV sagemaker
RUN pip install -U pip
RUN pip install -r requirements.txt
# Install jupyterlab vim extension, which requires nodejs
# RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
# RUN apt install nodejs
# # RUN jupyter labextension install @axlair/jupyterlab_vim
# # RUN jupyter labextension install @jupyterlab/toc