-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.old
More file actions
executable file
·106 lines (77 loc) · 2.27 KB
/
Dockerfile.old
File metadata and controls
executable file
·106 lines (77 loc) · 2.27 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# FROM nvidia/cuda:12.4.1-devel-ubuntu22.04 AS build-base
FROM nvidia/cuda:12.8.1-devel-ubuntu22.04 AS build-base
## Basic system setup
ENV user=devpod
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive \
TERM=linux
ENV TERM=xterm-color
ENV LANGUAGE=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
LC_CTYPE=en_US.UTF-8 \
LC_MESSAGES=en_US.UTF-8
RUN apt update && apt install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
git \
gpg \
gpg-agent \
less \
libbz2-dev \
libffi-dev \
liblzma-dev \
libncurses5-dev \
libncursesw5-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
llvm \
locales \
tk-dev \
tzdata \
unzip \
vim \
wget \
xz-utils \
zlib1g-dev \
zstd \
&& sed -i "s/^# en_US.UTF-8 UTF-8$/en_US.UTF-8 UTF-8/g" /etc/locale.gen \
&& locale-gen \
&& update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 \
&& apt clean
## System packages
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
openssh-server \
python3 \
python3-pip \
python-is-python3 \
&& apt-get clean
## Add user & enable sudo
RUN useradd -ms /bin/bash ${user}
RUN usermod -aG sudo ${user}
RUN apt-get install -y sudo
RUN echo "${user} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER ${user}
WORKDIR /home/${user}
## Python packages
RUN pip install --upgrade pip
RUN pip install wheel
# add specific version of JAX directry to the container
RUN pip install jax["cuda"]==0.5.3
# RUN pip install jax["cuda"]==0.6.0
COPY --chown=${user}:${user} ./pyproject.toml /home/${user}/
RUN pip install pip-tools
RUN python -m piptools compile --extra dev -o requirements.txt pyproject.toml
RUN pip install -r requirements.txt
## Dev tools (should not be in pyproject.toml)
RUN sudo apt-get -y install htop
RUN pip install multimethod jinja2
RUN pip install ipython seaborn datasets
# for debugging only
RUN pip install jax==0.5.3 transformers[torch]
RUN echo 'export HOME=/home/'$user >> /home/$user/.bashrc
RUN echo 'export PATH=/home/'$user'/.local/bin:${PATH}' >> /home/$user/.bashrc
CMD ["echo", "Balance is the key"]