Spaces:
Sleeping
Sleeping
FROM python:3.10 | |
RUN useradd -m -u 1000 user | |
USER user | |
WORKDIR /code | |
RUN chown -R user:user /code | |
ENV HOME=/home/user | |
ENV PATH=/home/user/.local/bin:$PATH | |
WORKDIR $HOME/app | |
COPY ./requirements.txt ./ | |
RUN pip install --no-cache-dir -r ./requirements.txt | |
COPY --chown=user . $HOME/app | |
### Update permissions for the app | |
USER root | |
RUN chmod 777 ~/app/* | |
USER user | |
#ENTRYPOINT ["gunicorn", "main:app"] | |
#ENV GUNICORN_TIMEOUT 300 | |
CMD ["python", "main.py"] |