File size: 715 Bytes
0024d27 a0ea132 0024d27 a0ea132 0024d27 a0ea132 8cdd597 bec03b3 a0ea132 bec03b3 a0ea132 0024d27 cf126e1 |
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 |
# Pull official base image
FROM python:3.9-slim
# Set work directory
WORKDIR /app
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Install system dependencies
RUN apt-get update && \
apt-get install -y python3-dev libpq-dev gcc g++ libjpeg-dev zlib1g-dev git zip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
COPY --chown=user ./requirements.txt requirements.txt
COPY --chown=user ./requirements1.txt requirements1.txt
COPY --chown=user ./download_image.py download_image.py
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user . /app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |