v / Dockerfile
navpan2's picture
Create Dockerfile
7a3c841 verified
raw
history blame contribute delete
330 Bytes
# Base image
FROM python:3.10-slim
# Set the working directory
WORKDIR /app
# Copy files to the container
COPY main.py /app/main.py
# Install FastAPI and Uvicorn
RUN pip install fastapi uvicorn
# Expose port 7860
EXPOSE 7860
# Command to run the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]