-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (24 loc) · 893 Bytes
/
Copy pathDockerfile
File metadata and controls
36 lines (24 loc) · 893 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
FROM node:22-slim AS frontend-build
WORKDIR /app/frontend
COPY frontend/package.json frontend/pnpm-lock.yaml frontend/pnpm-workspace.yaml ./
RUN corepack enable && corepack prepare pnpm@10.14.0 --activate && pnpm install --frozen-lockfile
COPY frontend/ ./
RUN pnpm run build
FROM python:3.10-slim
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
ARG REQUIREMENTS_FILE=requirements.txt
COPY --chown=user ./requirements.txt requirements.txt
COPY --chown=user ./requirements-lite.txt requirements-lite.txt
RUN pip install --no-cache-dir --upgrade -r "${REQUIREMENTS_FILE}"
COPY --chown=user . /app
COPY --from=frontend-build --chown=user /app/frontend/out /app/frontend/out
ENV PYTHONPATH=/app
ENV PORT=7777
ENV DEEPWIN_SERVICE_MODE=full
ENV HF_HOME=/tmp/huggingface
ENV XDG_CACHE_HOME=/tmp/.cache
EXPOSE 7777
CMD ["python", "-m", "api.app"]