fawadrashid's picture
Upload 3 files
e585f50 verified
raw
history blame contribute delete
496 Bytes
FROM python:3.9-slim
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
COPY ./requirements.txt ~/app/requirements.txt
USER root
RUN rm /var/lib/apt/lists/* -vf
RUN apt-get clean
RUN apt-get update
RUN apt-get upgrade
RUN apt-get install -y wget zip unzip uvicorn espeak-ng
USER user
COPY . .
USER root
RUN chmod 777 ~/app/*
USER user
RUN pip3 install -r requirements.txt
CMD ["python", "app.py"]