fastapi-app / Dockerfile
vaibhaviiii28's picture
Update Dockerfile
d44a6c1 verified
raw
history blame
558 Bytes
# Use an official Python image
FROM python:3.10
# Set the working directory inside the container
WORKDIR /app
# Copy the requirements file first (for caching optimization)
COPY requirements.txt /app/requirements.txt
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy all other application files
COPY . .
# Give execution permission to the startup script
RUN chmod +x start0.sh
# Expose the port used by Hugging Face Spaces (7860) or Cloud Run (8000)
EXPOSE 8000
# Run the app using the startup script
CMD ["./start0.sh"]