Files
movie-hub/Dockerfile
Aira Catapang 88cc85b98b Upload 3 files
2026-04-04 07:34:08 +00:00

23 lines
582 B
Docker

# Use official Python lightweight image
FROM python:3.10-slim
# Set the working directory
WORKDIR /app
# Copy requirements and install them
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application files
COPY . .
# Set up a non-root user (Required by Hugging Face Spaces)
RUN useradd -m -u 1000 user
RUN chown -R user:user /app
USER user
# Expose the default Hugging Face Space port
EXPOSE 7860
# Command to run the FastAPI application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]