github-actions[bot] commited on
Commit ·
854883f
1
Parent(s): 801f06c
Automated Deploy: 38acbd429ecc2a0b5ef97ae42d46fc0f2a9b9ae5
Browse files- .dockerignore +0 -1
- Dockerfile +3 -9
.dockerignore
CHANGED
|
@@ -2,7 +2,6 @@
|
|
| 2 |
.venv
|
| 3 |
node_modules
|
| 4 |
frontend/node_modules
|
| 5 |
-
frontend/dist
|
| 6 |
frontend/test-results
|
| 7 |
frontend/playwright-report
|
| 8 |
.env
|
|
|
|
| 2 |
.venv
|
| 3 |
node_modules
|
| 4 |
frontend/node_modules
|
|
|
|
| 5 |
frontend/test-results
|
| 6 |
frontend/playwright-report
|
| 7 |
.env
|
Dockerfile
CHANGED
|
@@ -1,12 +1,6 @@
|
|
| 1 |
# Hugging Face Docker Space. Inference runs only on the assigned GPU at runtime.
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
COPY package.json package-lock.json ./
|
| 5 |
-
COPY frontend/package.json frontend/package.json
|
| 6 |
-
RUN npm ci
|
| 7 |
-
COPY frontend frontend
|
| 8 |
-
RUN npm run build
|
| 9 |
-
|
| 10 |
FROM python:3.10-slim-bookworm
|
| 11 |
WORKDIR /workspace
|
| 12 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
@@ -35,7 +29,7 @@ RUN pip install --no-cache-dir torch==2.6.0 --index-url https://download.pytorch
|
|
| 35 |
RUN useradd -m -u 1000 studio
|
| 36 |
COPY --chown=studio:studio backend backend
|
| 37 |
COPY --chown=studio:studio scripts scripts
|
| 38 |
-
COPY --
|
| 39 |
# /workspace itself must be writable: the worker heartbeat is written beside
|
| 40 |
# ASSETS_DIR, and /data is pre-created so persistent-storage overrides work.
|
| 41 |
RUN mkdir -p data assets /home/studio/.cache /data \
|
|
|
|
| 1 |
# Hugging Face Docker Space. Inference runs only on the assigned GPU at runtime.
|
| 2 |
+
# frontend/dist is built in CI and shipped prebuilt, so the Space builder needs
|
| 3 |
+
# no Node toolchain and has one less network dependency that can fail.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
FROM python:3.10-slim-bookworm
|
| 5 |
WORKDIR /workspace
|
| 6 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
| 29 |
RUN useradd -m -u 1000 studio
|
| 30 |
COPY --chown=studio:studio backend backend
|
| 31 |
COPY --chown=studio:studio scripts scripts
|
| 32 |
+
COPY --chown=studio:studio frontend/dist frontend/dist
|
| 33 |
# /workspace itself must be writable: the worker heartbeat is written beside
|
| 34 |
# ASSETS_DIR, and /data is pre-created so persistent-storage overrides work.
|
| 35 |
RUN mkdir -p data assets /home/studio/.cache /data \
|