onthego / Dockerfile1
Azeez98's picture
Rename Dockerfile to Dockerfile1
bfa58ec verified
raw
history blame contribute delete
715 Bytes
# 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"]