forked from mlcommons/algorithmic-efficiency
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 994 Bytes
/
Dockerfile
File metadata and controls
36 lines (28 loc) · 994 Bytes
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
FROM nvidia/cuda:11.1.1-cudnn8-devel-ubuntu20.04
ARG UID=1000
ARG ACCELERATOR=gpu
RUN apt-get update && \
apt-get install -y bash \
build-essential \
git \
curl \
ca-certificates \
python3 \
sudo \
python3-pip && \
rm -rf /var/lib/apt/lists
RUN python3 -m pip install --no-cache-dir --upgrade pip
# add user
RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u $UID ubuntu
# set working directory
WORKDIR /home/ubuntu/algorithmic-efficiency
# setup path
ENV PATH="/home/ubuntu/.local/bin:${PATH}"
# copy files
COPY . /home/ubuntu/algorithmic-efficiency
# install python packages
RUN pip3 install --user .[jax_$ACCELERATOR] -f 'https://storage.googleapis.com/jax-releases/jax_releases.html'
RUN pip3 install --user .[pytorch] -f 'https://download.pytorch.org/whl/torch_stable.html'
RUN pip3 install --user -e .
# bash
CMD ["/bin/bash"]