Spaces:
Sleeping
Sleeping
File size: 800 Bytes
6e53ffe fa838cb 6e53ffe fbdcfe2 6e53ffe fbdcfe2 6e53ffe fbdcfe2 6e53ffe db2cc77 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Create the directory and set permissions
RUN mkdir -p /app/static/watermarked_images && \
chmod 777 /app/static/watermarked_images
# Install the dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Set environment variables
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
ENV PORT=7860
# Install system fonts
RUN apt-get update && apt-get install -y \
fonts-liberation \
&& rm -rf /var/lib/apt/lists/*
# Expose the port the app runs on
EXPOSE 7860
# Define the command to run your app using Gunicorn
CMD ["sh", "-c", "gunicorn app:app --bind 0.0.0.0:$PORT"] |