dishDecode / Dockerfile
GoodML's picture
Update Dockerfile
65501bb verified
raw
history blame
1.06 kB
FROM python:3.10
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user . /app
# CMD ["gunicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
# FROM python:3.10
# # Create a user for running the application
# RUN useradd -m -u 1000 user
# USER user
# ENV PATH="/home/user/.local/bin:$PATH"
# # Set the working directory for your app inside the container
# WORKDIR /app
# # Copy requirements.txt and install dependencies
# COPY --chown=user ./requirements.txt requirements.txt
# RUN pip install --no-cache-dir --upgrade -r requirements.txt
# # Install Hypercorn for Quart
# RUN pip install hypercorn
# # Copy the rest of the application files into the container
# COPY --chown=user . /app
# # Run the Quart app with Hypercorn, binding it to all interfaces on port 8000
# CMD ["hypercorn", "app:app", "--bind", "0.0.0.0:8000"]