car-angle / Dockerfile
jsijan's picture
Create Dockerfile
d4ebfd5 verified
Raw History Blame Contribute Delete
549 Bytes
# Use lightweight Python base image
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install system packages
RUN apt-get update && apt-get install -y \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy dependencies file and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy your FastAPI app code
COPY app /app/app
# Expose the port (default for Spaces)
EXPOSE 7860
# Run the API on the correct port for Spaces
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]