Buckets:
| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| WORKDIR /app | |
| # Install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application files | |
| COPY backend/ ./backend/ | |
| COPY static/ ./static/ | |
| COPY DangVan/ ./DangVan/ | |
| # Create directories for results and database | |
| RUN mkdir -p /app/backend/simulation_results && chmod 777 /app/backend/simulation_results | |
| # Initialize database and collect static files | |
| WORKDIR /app/backend | |
| RUN python manage.py migrate --noinput | |
| RUN python manage.py collectstatic --noinput | |
| # HF Spaces uses port 7860 | |
| EXPOSE 7860 | |
| # Run with gunicorn | |
| CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "2", "--timeout", "120", "backend.wsgi:application"] | |
Xet Storage Details
- Size:
- 783 Bytes
- Xet hash:
- 5344595861f10b9ce0a8003fd6806d9fe5bf542a038d57548ccb466665408d7e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.