mirror of
https://huggingface.co/spaces/Catapang1989/movie-hub
synced 2026-04-17 16:11:45 +00:00
23 lines
582 B
Docker
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"] |