ROCm-Forge / Dockerfile
iwilldoit's picture
fix: use port 7860 for Hugging Face Docker Spaces
5d174e7
Raw
History Blame Contribute Delete
348 Bytes
FROM python:3.9-slim
WORKDIR /app
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Expose port 7860 (Hugging Face Spaces default)
ENV PORT=7860
EXPOSE 7860
# Command to run the FastAPI app
CMD uvicorn api:app --host 0.0.0.0 --port ${PORT}