Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +19 -24
Dockerfile
CHANGED
|
@@ -1,30 +1,25 @@
|
|
| 1 |
-
FROM node:20-bookworm AS frontend-builder
|
| 2 |
-
WORKDIR /workspace/frontend
|
| 3 |
-
COPY frontend/package*.json ./
|
| 4 |
-
RUN npm install
|
| 5 |
-
COPY frontend/ ./
|
| 6 |
-
ENV NEXT_TELEMETRY_DISABLED=1
|
| 7 |
-
RUN npm run build
|
| 8 |
-
|
| 9 |
FROM python:3.11-slim
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
WORKDIR /workspace
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
COPY backend /workspace/backend
|
| 16 |
COPY scripts /workspace/scripts
|
| 17 |
COPY data_samples /workspace/data_samples
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
COPY --from=frontend-builder /workspace/frontend/public /workspace/frontend/public
|
| 22 |
-
COPY --from=frontend-builder /workspace/frontend/package*.json /workspace/frontend/
|
| 23 |
-
COPY --from=frontend-builder /workspace/frontend/next.config.js /workspace/frontend/
|
| 24 |
-
COPY --from=frontend-builder /workspace/frontend/app /workspace/frontend/app
|
| 25 |
-
COPY --from=frontend-builder /workspace/frontend/components /workspace/frontend/components
|
| 26 |
-
COPY --from=frontend-builder /workspace/frontend/lib /workspace/frontend/lib
|
| 27 |
-
COPY --from=frontend-builder /workspace/frontend/tsconfig.json /workspace/frontend/tsconfig.json
|
| 28 |
-
RUN chmod +x /workspace/space/start.sh && mkdir -p /data/uploads /data/artifacts
|
| 29 |
EXPOSE 7860
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
ENV PYTHONDONTWRITEBYTECODE=1 \
|
| 4 |
+
PYTHONUNBUFFERED=1 \
|
| 5 |
+
PORT=7860
|
| 6 |
+
|
| 7 |
WORKDIR /workspace
|
| 8 |
+
|
| 9 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 10 |
+
build-essential \
|
| 11 |
+
curl \
|
| 12 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
+
|
| 14 |
+
COPY backend/requirements.txt /workspace/requirements.txt
|
| 15 |
+
RUN pip install --no-cache-dir -r /workspace/requirements.txt
|
| 16 |
+
|
| 17 |
COPY backend /workspace/backend
|
| 18 |
COPY scripts /workspace/scripts
|
| 19 |
COPY data_samples /workspace/data_samples
|
| 20 |
+
|
| 21 |
+
RUN mkdir -p /data/uploads /data/artifacts
|
| 22 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
EXPOSE 7860
|
| 24 |
+
|
| 25 |
+
CMD ["uvicorn", "backend.app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|