kaidraco/example2
0
1# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker2# you will also find guides on how best to write your Dockerfile3 4FROM python:3.95 6### Set up user with permissions7# Set up a new user named "user" with user ID 10008RUN useradd -m -u 1000 user9 10# Switch to the "user" user11USER user12 13# Set home to the user's home directory14ENV HOME=/home/user \15 PATH=/home/user/.local/bin:$PATH16 17# Set the working directory to the user's home directory18WORKDIR $HOME/app19 20COPY . .21 22### Update permissions for the app23USER root24RUN apt-get update -y && apt-get upgrade -y25RUN apt-get install -y aria2 p7zip-full26RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb && apt install -y ./libssl1.1_1.1.1f-1ubuntu2_amd64.deb && rm ./libssl1.1_1.1.1f-1ubuntu2_amd64.deb27RUN wget https://mega.nz/linux/repo/Debian_9.0/amd64/megacmd-Debian_9.0_amd64.deb && apt install -y ./megacmd-Debian_9.0_amd64.deb && rm ./megacmd-Debian_9.0_amd64.deb28RUN chmod 777 ~/app/*29USER user30 31RUN pip install flask gunicorn mega.py32EXPOSE 7860 786033 34CMD ["gunicorn", "main:app", "-b", "0.0.0.0:7860"]