Spaces:
Sleeping
Sleeping
| # Use python 3.9 slim image | |
| FROM python:3.9-slim | |
| # Set working directory | |
| WORKDIR /code | |
| # Copy requirements first (for caching) | |
| COPY ./requirements.txt /code/requirements.txt | |
| # Install dependencies | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Copy the model directory and code | |
| # MAKE SURE your model is unzipped in a folder named 'model' | |
| COPY ./model /code/model | |
| COPY ./main.py /code/main.py | |
| # Run the app | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |