Spaces:
Running
Running
File size: 541 Bytes
f5ebc4b 064c989 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# Use the official Python image as the base image
FROM python:3.10-slim
# Set the working directory
WORKDIR /app
# Install dependencies
COPY requirements.txt .
# Install dependencies from requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy all other files into the container
COPY . .
# Expose the port where the app will run
EXPOSE 8000
# Set environment variables if necessary
ENV PATH="/app:${PATH}"
# Command to run FastAPI app with Uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|