youngtsai commited on
Commit
12bf530
1 Parent(s): 8589944

docker push

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ USER root
4
+ RUN apt-get update && apt-get install -y \
5
+ git \
6
+ ca-certificates \
7
+ --no-install-recommends && \
8
+ apt-get clean && \
9
+ rm -rf /var/lib/apt/lists/*
10
+
11
+ RUN useradd -m -u 1000 user
12
+
13
+ USER user
14
+
15
+ ENV HOME=/home/user \
16
+ PATH=/home/user/.local/bin:$PATH
17
+
18
+ WORKDIR $HOME/app
19
+
20
+ RUN --mount=type=secret,id=HF_UAT,mode=0444,required=true \
21
+ git clone https://ChenyuRabbitLove:$(cat /run/secrets/HF_UAT)@huggingface.co/spaces/junyiacademy/j_write.git
22
+
23
+ RUN mv $HOME/app/j_write/* $HOME/app/
24
+
25
+ RUN pip install --no-cache-dir --upgrade -r $HOME/app/requirements.txt
26
+
27
+ RUN --mount=type=secret,id=OPEN_AI_KEY,mode=0444,required=true \
28
+ export OPEN_AI_KEY=$(cat /run/secrets/OPEN_AI_KEY) && \
29
+ echo "export OPEN_AI_KEY=${OPEN_AI_KEY}" >> $HOME/.bashrc
30
+
31
+
32
+ CMD ["python", "app.py"]