-
Notifications
You must be signed in to change notification settings - Fork 24
/
cpu.Dockerfile
52 lines (41 loc) · 1.19 KB
/
cpu.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
52
FROM python:3.8
# Install zip and OpenGL (the latter is needed for OpenCV)
RUN apt update && \
apt install -y zip libgl1-mesa-glx
# Install poetry
RUN pip install --upgrade pip && \
pip install poetry && \
poetry config virtualenvs.create false
# Install dependencies
RUN mkdir -p /chess
WORKDIR /chess
COPY ./pyproject.toml ./poetry.lock* ./
RUN poetry install --no-root
ENV PYTHONPATH "/chess:${PYTHONPATH}"
# Setup data mount
RUN mkdir -p /data
ENV DATA_DIR /data
VOLUME /data
# Setup config mount
RUN mkdir -p /config
ENV CONFIG_DIR /config
VOLUME /config
# Setup run mount
RUN mkdir -p /chess/runs
ENV RUN_DIR /chess/runs
VOLUME /chess/runs
# Setup results mount
RUN mkdir -p /chess/results
ENV RESULTS_DIR /chess/results
VOLUME /chess/results
# Setup models mount
RUN mkdir -p /chess/models
ENV MODELS_DIR /chess/models
VOLUME /chess/models
# Copy files
COPY chesscog ./chesscog
# Scratch volume
VOLUME /chess/scratch
# Entrypoint (password is "chesscog")
CMD poetry run tensorboard --logdir ./runs --host 0.0.0.0 --port 9999 & \
poetry run jupyter lab --no-browser --allow-root --ip 0.0.0.0 --port 8888 --NotebookApp.password "sha1:22fda334b4b5:770a9d781f1e689afdcd2c55e7abae94ba74d925"