Spaces:
Sleeping
Sleeping
FROM python:3.8.1 | |
WORKDIR /code | |
COPY ./requirements.txt /code/requirements.txt | |
RUN apt-get update && \ | |
apt-get install -y sudo tmux wget curl htop make tree && \ | |
apt-get install -y iputils-ping telnet && \ | |
apt-get install -y git git-lfs | |
RUN --mount=type=secret,id=PASSWORD,mode=0444,required=true \ | |
useradd -m -u 1000 user && \ | |
echo "user:$(cat /run/secrets/PASSWORD)" | chpasswd && \ | |
adduser user sudo | |
RUN pip install -U pip pysocks | |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
USER user | |
ENV HOME=/home/user | |
ENV PATH=$HOME/.local/bin:$PATH | |
ENV SHELL=/bin/bash | |
WORKDIR $HOME | |
COPY --chown=user . $HOME/app | |
COPY .bashrc $HOME/.bashrc_append | |
RUN cat $HOME/.bashrc_append >> $HOME/.bashrc && \ | |
rm $HOME/.bashrc_append | |
EXPOSE 7860 | |
ENTRYPOINT [] | |
CMD ["/bin/bash", "./app/run.sh"] | |