File size: 825 Bytes
0f8e5f2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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"]