Spaces:
Sleeping
Sleeping
| # Use the official Python 3.12 slim image | |
| FROM python:3.12-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Copy all application files | |
| COPY . . | |
| # Run the FastAPI app with Uvicorn on port 7860 (required by HF Spaces) | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |
| # docker build -t precollegefastapi . | |
| # docker images | |
| # docker ps | |
| # docker run --env-file .env -p 8080:8080 precollegefastapi | |
| # docker tag precollegefastapi asura0575/precollegefastapi:latest | |
| # docker push asura0575/precollegefastapi | |