ChenyuRabbitLove commited on
Commit
1d555c6
·
verified ·
1 Parent(s): 9a9a1bc

feat: create dockerfile

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