Spaces:
Sleeping
Sleeping
Download Dockerfile from luli331/letudiant_admin: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/spaces/luli331/letudiant_admin/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/luli331/letudiant_admin/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/luli331/letudiant_admin/resolve/main/Dockerfile
1.06 kB
| # ββ Stage 1: build the Vite frontend ββββββββββββββββββββββββββββββββββββββββ | |
| FROM node:20-slim AS frontend-builder | |
| WORKDIR /app/frontend | |
| COPY frontend/package*.json ./ | |
| RUN npm ci | |
| COPY frontend/ ./ | |
| RUN npm run build | |
| # ββ Stage 2: Python runtime ββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| FROM python:3.11-slim | |
| WORKDIR /code | |
| # Install Python dependencies | |
| COPY backend/requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY backend/ ./backend/ | |
| COPY scripts/ ./scripts/ | |
| COPY data/ ./data/ | |
| # Copy built frontend assets | |
| COPY --from=frontend-builder /app/frontend/dist ./frontend/dist | |
| # Hugging Face Spaces runs as a non-root user; ensure the db directory is writable | |
| RUN mkdir -p backend/app/db && chmod -R 775 backend/app/db | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "backend.app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |