apikey / Dockerfile
triflix's picture
Create Dockerfile
301ea28 verified
raw
history blame contribute delete
411 Bytes
# Use official lightweight Python image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Copy all project files
COPY . /app
# Install dependencies (no version pinning)
RUN pip install --no-cache-dir fastapi uvicorn pydantic
# Expose port 7860 (Hugging Face Spaces standard)
EXPOSE 7860
# Default command to run the FastAPI app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]