-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (30 loc) · 974 Bytes
/
Dockerfile
File metadata and controls
45 lines (30 loc) · 974 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
37
38
39
40
41
42
43
44
45
FROM d3smond/cuda-rocky:latest
ENV TZ=Europe/Zagreb
ENV PIP_ROOT_USER_ACTION=ignore
ARG USE_PERSISTENT_DATA
RUN mkdir -p /data && chmod -R 777 /data
COPY ./setup/setup.sh /setup/setup.sh
COPY ./setup/debug.sh /setup/debug.sh
COPY ./setup/run.sh /setup/run.sh
COPY ./setup/startup.sh /setup/startup.sh
COPY ./setup/requirements.txt /setup/requirements.txt
# Copy
RUN chmod +x /setup/*.sh
# ENV
ENV HOME=/root \
PATH=/root/.local/bin:$PATH
# Pyenv
RUN curl https://pyenv.run | bash
ENV PATH=$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH
ARG PYTHON_VERSION=3.11
# Python
RUN pyenv install $PYTHON_VERSION && \
pyenv global $PYTHON_VERSION && \
pyenv rehash && \
pip install --no-cache-dir --upgrade pip setuptools wheel
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade -r /setup/requirements.txt
# Set the working directory to /data mounted from docker compose
WORKDIR $HOME/app
RUN echo "Done."
CMD ["bash","/setup/startup.sh"]