Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files- Dockerfile +8 -4
Dockerfile
CHANGED
@@ -1,12 +1,16 @@
|
|
1 |
FROM ghcr.io/astral-sh/uv:debian-slim
|
2 |
|
3 |
-
WORKDIR /app
|
4 |
-
|
5 |
RUN groupadd nonroot && useradd -g nonroot nonroot
|
6 |
|
|
|
|
|
|
|
|
|
|
|
7 |
# Enable bytecode compilation, Copy from the cache instead of linking since it's a mounted volume
|
8 |
ENV UV_COMPILE_BYTECODE=1 \
|
9 |
-
UV_LINK_MODE=copy
|
|
|
10 |
|
11 |
# skipcq: DOK-DL3008
|
12 |
RUN apt-get update && \
|
@@ -21,7 +25,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
|
21 |
--mount=type=bind,source=.python-version,target=.python-version \
|
22 |
uv sync --frozen --no-install-project --no-dev
|
23 |
|
24 |
-
COPY . /app
|
25 |
|
26 |
RUN --mount=type=cache,target=/root/.cache/uv \
|
27 |
uv sync --frozen --no-dev;
|
|
|
1 |
FROM ghcr.io/astral-sh/uv:debian-slim
|
2 |
|
|
|
|
|
3 |
RUN groupadd nonroot && useradd -g nonroot nonroot
|
4 |
|
5 |
+
WORKDIR /home/app
|
6 |
+
|
7 |
+
RUN mkdir -p /home/nonroot/.cache/uv && \
|
8 |
+
chown -R nonroot:nonroot /home/nonroot
|
9 |
+
|
10 |
# Enable bytecode compilation, Copy from the cache instead of linking since it's a mounted volume
|
11 |
ENV UV_COMPILE_BYTECODE=1 \
|
12 |
+
UV_LINK_MODE=copy \
|
13 |
+
UV_CACHE_DIR=/home/nonroot/.cache/uv
|
14 |
|
15 |
# skipcq: DOK-DL3008
|
16 |
RUN apt-get update && \
|
|
|
25 |
--mount=type=bind,source=.python-version,target=.python-version \
|
26 |
uv sync --frozen --no-install-project --no-dev
|
27 |
|
28 |
+
COPY . /home/app
|
29 |
|
30 |
RUN --mount=type=cache,target=/root/.cache/uv \
|
31 |
uv sync --frozen --no-dev;
|