FROM python:3.10-slim RUN apt-get -y update RUN apt-get -y install git 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 RUN pip install --no-cache-dir -r $HOME/app/requirements.txt RUN mkdir -p $HOME/app/mirror_outputs/Mirror_Pretrain_AllExcluded_2/middle RUN chmod -R 777 $HOME/app/mirror_outputs/Mirror_Pretrain_AllExcluded_2/middle RUN mkdir -p $HOME/app/mirror_outputs/Mirror_Pretrain_AllExcluded_2/measures RUN chmod -R 777 $HOME/app/mirror_outputs/Mirror_Pretrain_AllExcluded_2/measures # start service EXPOSE 7860 CMD ["python", "-m", "src.app.api_backend"]