-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·51 lines (43 loc) · 1.44 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
41
42
43
44
45
46
47
48
49
50
51
# base stage contains just dependencies.
FROM nvidia/cuda:11.6.2-cudnn8-runtime-ubuntu20.04 as dependencies
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
# Python 3.9
python3.9 \
python3.9-dev \
python3-pip \
python-tk \
virtualenv \
# Misc
curl \
gcc \
g++ \
libc6-dev \
# git is needed by Sacred
git \
# Needed for procgen
qt5-default \
cmake \
gcc \
build-essential \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /reward_preprocessing
ENV PATH="/venv/bin:$PATH"
COPY ./requirements.txt /reward_preprocessing/
COPY ./requirements-dev.txt /reward_preprocessing/
COPY ci/build_and_activate_venv.sh ./ci/build_and_activate_venv.sh
RUN ci/build_and_activate_venv.sh /venv
# full stage contains everything.
# Can be used for deployment and local testing.
FROM dependencies as full
# Delay copying (and installing) the code until the very end
COPY . /reward_preprocessing
# Build a wheel then install to avoid copying whole directory (pip issue #2195)
# Note that all dependencies were already installed in the previous stage.
# The purpose of this is only to make the local code available as a package for
# easier import.
RUN python setup.py sdist bdist_wheel
RUN pip install dist/reward_preprocessing-*.whl
# Set to src directory so scripts can be run as python -m reward_preprocessing. ...
WORKDIR /reward_preprocessing/src/
CMD ["pytest"]