Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +0 -7
Dockerfile
CHANGED
@@ -2,19 +2,12 @@ from python:3.10
|
|
2 |
|
3 |
workdir /app
|
4 |
|
5 |
-
# 设置 TRANSFORMERS_CACHE 环境变量
|
6 |
-
ENV TRANSFORMERS_CACHE=/app/cache
|
7 |
-
|
8 |
copy requirements.txt .
|
9 |
run pip install -r requirements.txt
|
10 |
|
11 |
run mkdir /.cache && chmod 777 /.cache
|
12 |
run mkdir .chroma && chmod 777 .chroma
|
13 |
copy . .
|
14 |
-
|
15 |
-
RUN --mount=type=secret,id=API_KEY,mode=0444,required=true \
|
16 |
-
touch /app/api_key.txt && echo $(cat /run/secrets/API_KEY) > /app/api_key.txt
|
17 |
-
|
18 |
expose 7860
|
19 |
|
20 |
cmd ["python", "server.py"]
|
|
|
2 |
|
3 |
workdir /app
|
4 |
|
|
|
|
|
|
|
5 |
copy requirements.txt .
|
6 |
run pip install -r requirements.txt
|
7 |
|
8 |
run mkdir /.cache && chmod 777 /.cache
|
9 |
run mkdir .chroma && chmod 777 .chroma
|
10 |
copy . .
|
|
|
|
|
|
|
|
|
11 |
expose 7860
|
12 |
|
13 |
cmd ["python", "server.py"]
|