-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile-domino-piece.gpu-dev
53 lines (41 loc) · 1.45 KB
/
Dockerfile-domino-piece.gpu-dev
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
FROM nvidia/cuda:11.8.0-base-ubuntu22.04
ENV PYTHONUNBUFFERED=1
# SYSTEM
RUN apt-get update --yes --quiet && DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \
software-properties-common \
build-essential apt-utils \
&& rm -rf /var/lib/apt/lists/*
# Python
RUN add-apt-repository --yes ppa:deadsnakes/ppa && apt-get update --yes --quiet
RUN DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \
python3.10 \
python3.10-dev \
python3.10-distutils \
python3.10-lib2to3 \
python3.10-gdbm \
python3.10-tk \
pip
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 999 \
&& update-alternatives --config python3
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN pip install --upgrade pip
# Domino
## Create folders to store source code
RUN mkdir -p /home/domino/pieces_repository
## Create folder to store run data results
RUN mkdir -p /home/run_data
WORKDIR /home/run_data
RUN chmod -R 777 .
## Create folder for sidecar pod mount to read xcom data
RUN mkdir -p /airflow/xcom/
RUN echo "{}" > /airflow/xcom/return.json
WORKDIR /airflow/xcom
RUN chmod -R 777 .
## Editable pip install for Domino from local folder
RUN mkdir -p /home/domino/domino_py
COPY pyproject.toml /home/domino/domino_py/
COPY src/domino /home/domino/domino_py/src/domino
WORKDIR /home/domino/domino_py
RUN chmod -R 777 .
RUN pip install --no-cache -e .[cli]
WORKDIR /home