Param20h's picture
Upload Dockerfile with huggingface_hub
4fa680b verified
Raw
History Blame Contribute Delete
471 Bytes
FROM python:3.12-slim
WORKDIR /code
# Copy requirements and install
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy all files (including dataset if present locally)
COPY . /code
# Set permissions for user 1000 (Hugging Face Spaces runs as user 1000)
RUN chmod -R 777 /code
# Start uvicorn on port 7860 (Hugging Face standard)
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]