helper / Dockerfile
elliotp1's picture
Upload folder using huggingface_hub
0f8e5f2 verified
raw
history blame contribute delete
825 Bytes
FROM debian:10
ENV CHROME_BIN=/usr/bin/chromium
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Jakarta
ENV USERNAME=ripp
ENV HOSTNAME=mxmxk
ENV PORT=7860
RUN apt-get update
RUN apt-get install -y \
software-properties-common \
bash
RUN apt-get install -y \
git \
curl \
build-essential
RUN rm -rf /var/lib/apt/lists/*
RUN curl -Ssf https://pkgx.sh | sh
RUN useradd -m -u 1000 $USERNAME
#END OF ROOT USER#
USER $USERNAME
ENV HOME=/home/$USERNAME
ENV PATH=/home/$USERNAME/.local/bin:$PATH
ENV WORKDIR=$HOME/app
ARG HF_TOKEN=$HF_TOKEN
WORKDIR $WORKDIR
COPY --chown=$USERNAME . $WORKDIR
RUN git clone https://hf.co/spaces/ochinpo/helper
RUN cd helper
RUN pkgx huggingface-cli upload elliotp1/helper . . --repo-type space --token $HF_TOKEN
EXPOSE $PORT
RUN chmod -R 777 $WORKDIR
CMD ["exit"]