Spaces:
Runtime error
Runtime error
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker | |
# you will also find guides on how best to write your Dockerfile | |
FROM ubuntu:22.04 | |
RUN apt-get update | |
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
sudo \ | |
build-essential \ | |
gettext \ | |
autoconf \ | |
automake \ | |
libproxy-dev \ | |
libxml2-dev \ | |
libtool \ | |
vpnc-scripts \ | |
pkg-config \ | |
libgnutls28-dev \ | |
git \ | |
expect | |
RUN apt-get update \ | |
&& apt-get install -y python3-pip python3-dev \ | |
&& cd /usr/local/bin \ | |
&& ln -s -f /usr/bin/python3 python \ | |
&& pip3 --no-cache-dir install --upgrade pip \ | |
&& rm -rf /var/lib/apt/lists/* | |
WORKDIR /code | |
COPY ./requirements.txt /code/requirements.txt | |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
#RUN pip install --upgrade PyGPT | |
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 | |
CMD ["python", "main.py"] | |