Spaces:
Sleeping
Sleeping
Delete Dockerfile
Browse files- Dockerfile +0 -33
Dockerfile
DELETED
|
@@ -1,33 +0,0 @@
|
|
| 1 |
-
# Use Node.js for building the Vite frontend
|
| 2 |
-
FROM node:20-alpine AS frontend-builder
|
| 3 |
-
WORKDIR /app/frontend
|
| 4 |
-
COPY frontend/package*.json ./
|
| 5 |
-
RUN npm ci
|
| 6 |
-
COPY frontend/ ./
|
| 7 |
-
RUN npm run build
|
| 8 |
-
|
| 9 |
-
# Use Python for the FastAPI backend
|
| 10 |
-
FROM python:3.12-slim
|
| 11 |
-
|
| 12 |
-
# Create user with UID 1000 as required by Hugging Face Spaces
|
| 13 |
-
RUN useradd -m -u 1000 user
|
| 14 |
-
USER user
|
| 15 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
| 16 |
-
|
| 17 |
-
WORKDIR /app
|
| 18 |
-
|
| 19 |
-
# Install dependencies
|
| 20 |
-
COPY --chown=user backend/requirements.txt ./
|
| 21 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 22 |
-
|
| 23 |
-
# Copy backend code
|
| 24 |
-
COPY --chown=user backend/ ./backend/
|
| 25 |
-
|
| 26 |
-
# Copy built frontend from builder stage
|
| 27 |
-
COPY --chown=user --from=frontend-builder /app/frontend/dist ./frontend/dist
|
| 28 |
-
|
| 29 |
-
# Expose Hugging Face Space port
|
| 30 |
-
EXPOSE 7860
|
| 31 |
-
|
| 32 |
-
# Run FastAPI application on port 7860
|
| 33 |
-
CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|