api / Dockerfile
RishiXD's picture
Update Dockerfile
6b50bcf verified
raw
history blame contribute delete
371 Bytes
# Use a slim Python base
FROM python:3.9-slim
# Set working dir
WORKDIR /app
# Copy and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Expose the new port and set it via env var
ENV PORT=7860
EXPOSE ${PORT}
# Run Uvicorn bound to port 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]