Spaces:
Running
Running
FROM python:3.10 | |
# Set environment variables | |
ENV PYTHONUNBUFFERED=1 \ | |
PORT=8000 \ | |
HF_HOME=/home/user/huggingface | |
# Create necessary folders | |
RUN mkdir -p /home/user/huggingface | |
# Install dependencies | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy app files | |
COPY . . | |
# Expose the port | |
EXPOSE $PORT | |
# Run the FastAPI app with uvicorn | |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] | |