Spaces:
Build error
Build error
dockerilfe
Browse files- Dockerfile +13 -11
Dockerfile
CHANGED
@@ -1,24 +1,26 @@
|
|
1 |
-
FROM python:3.11-bookworm as builder
|
2 |
-
|
3 |
-
WORKDIR /code
|
4 |
-
|
5 |
-
COPY server/pdm.lock server/pyproject.toml ./
|
6 |
-
|
7 |
-
RUN pip install pdm
|
8 |
-
|
9 |
-
RUN pdm venv create --no-symlink
|
10 |
-
RUN pdm install
|
11 |
-
|
12 |
FROM nvidia/cuda:12.3.1-devel-ubuntu20.04
|
13 |
|
14 |
RUN useradd -m -u 1000 user
|
15 |
USER user
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
ENV HOME=/home/user \
|
18 |
PATH=/home/user/.local/bin:$PATH
|
19 |
|
20 |
WORKDIR $HOME/code
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
COPY --from=builder --chown=user /code/.venv ./.venv
|
23 |
|
24 |
COPY --chown=user server/ ./
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM nvidia/cuda:12.3.1-devel-ubuntu20.04
|
2 |
|
3 |
RUN useradd -m -u 1000 user
|
4 |
USER user
|
5 |
|
6 |
+
RUN apt-add-repository ppa:deadsnakes/ppa \
|
7 |
+
&& apt-get update \
|
8 |
+
&& DEBIAN_FRONTEND=noninteractive \
|
9 |
+
apt-get install --no-install-recommends --assume-yes \
|
10 |
+
python3.11
|
11 |
+
|
12 |
ENV HOME=/home/user \
|
13 |
PATH=/home/user/.local/bin:$PATH
|
14 |
|
15 |
WORKDIR $HOME/code
|
16 |
|
17 |
+
COPY --chown=user server/pdm.lock server/pyproject.toml ./
|
18 |
+
|
19 |
+
RUN pip install pdm
|
20 |
+
|
21 |
+
RUN pdm venv create --no-symlink
|
22 |
+
RUN pdm install
|
23 |
+
|
24 |
COPY --from=builder --chown=user /code/.venv ./.venv
|
25 |
|
26 |
COPY --chown=user server/ ./
|