crazy / Dockerfile
Charan5775's picture
Update Dockerfile
881ab84 verified
raw
history blame contribute delete
709 Bytes
# Use an official Python runtime as a parent image
FROM python:3.12
# Set the working directory in the container
RUN --mount=type=secret,id=Access_key,mode=0444,required=true \
git clone $(cat /run/secrets/Access_key) /app
WORKDIR /app
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Make port 7860 available to the world outside this container
EXPOSE 7860
# Run app.py when the container launches
#CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
CMD ["gunicorn", "-w", "5", "-k", "uvicorn.workers.UvicornWorker", "main:app", "--bind", "0.0.0.0:7860", "--threads", "2", "--timeout", "120", "--forwarded-allow-ips", "*"]