testing_space / Dockerfile
everydaytok's picture
Update Dockerfile
2a3f3b1 verified
# Use the official lightweight Python image
FROM python:3.9-slim
# Set the working directory
WORKDIR /app
# Copy dependencies and install them
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Create a directory for static files (frontend) if it doesn't exist
RUN mkdir -p static
# Expose the port Hugging Face expects
EXPOSE 7860
# Run the FastAPI server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]