FastApi / Dockerfile
Soumik555's picture
first hf space commit
7403f2c
raw
history blame
492 Bytes
# Use the official Python 3.11 slim image
FROM python:3.11-slim
# Set the working directory inside the container
WORKDIR /app
# Copy the requirements file first
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Expose port 7860 (required by Hugging Face Spaces)
EXPOSE 7860
# Command to start FastAPI using Uvicorn
CMD ["uvicorn", "controller:app", "--host", "0.0.0.0", "--port", "7860"]