Spaces:
Build error
Build error
File size: 509 Bytes
27c4848 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | FROM python:3.10-slim
WORKDIR /app
# Copy requirements and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the code
COPY . .
# Create necessary directories if they don't exist
RUN mkdir -p static
# Make port 7860 available (Hugging Face Spaces uses this port)
EXPOSE 7860
# Set environment variables
ENV HOST=0.0.0.0
ENV PORT=7860
# Run the application
CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|