CoolFace
Apppublic

jcsuar/algorithmic-angle

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
Dockerfile25 linesDownload Raw Back to root
1# Use a standard Python 3.9 image as the base2FROM python:3.93 4# Set up a non-root user for better security5RUN useradd -m -u 1000 user6USER user7ENV PATH="/home/user/.local/bin:$PATH"8 9# Set the working directory inside the container10WORKDIR /app11 12# Copy the requirements file first and install dependencies13# This is efficient because Docker caches this layer. It only re-runs if requirements.txt changes.14COPY --chown=user ./requirements.txt requirements.txt15RUN pip install --no-cache-dir --upgrade -r requirements.txt16 17# Copy the rest of your application code into the WORKDIR18COPY --chown=user . /app19 20# Expose the port the app will run on21EXPOSE 786022 23# The command to start your web server when the container launches.24# We use Gunicorn, a professional-grade server for Flask apps.25CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "4", "app:app"]