Spaces:
Sleeping
Sleeping
File size: 607 Bytes
6da83c8 37c6f87 6da83c8 37c6f87 6da83c8 37c6f87 6da83c8 b04e9f2 6da83c8 f4b92bb 6da83c8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# Use a Python base image
FROM python:3.9-slim-buster
# Set working directory
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy your application code
COPY app.py .
# Expose the port your API will run on (Hugging Face Spaces uses 7860 by default for Gradio/Streamlit,
# but for custom Docker, you can choose, e.g., 8000 for FastAPI or 5000 for Flask).
EXPOSE 8000
# Command to run your FastAPI/Flask app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] # For FastAPI
# CMD ["python", "app.py"] # For a simple Flask app |