Spaces:
Paused
Paused
token fix
Browse files- Dockerfile +1 -0
- download_pre_datas.py +1 -2
Dockerfile
CHANGED
|
@@ -32,6 +32,7 @@ RUN ./.pixi/envs/default/bin/python3 -m pip install psutil
|
|
| 32 |
|
| 33 |
RUN ./.pixi/envs/default/bin/python3 -m pip install moviepy
|
| 34 |
|
|
|
|
| 35 |
RUN ./.pixi/envs/default/bin/python /app/code/download_pre_datas.py
|
| 36 |
|
| 37 |
CMD ["./.pixi/envs/default/bin/python", "/app/code/web_server.py"]
|
|
|
|
| 32 |
|
| 33 |
RUN ./.pixi/envs/default/bin/python3 -m pip install moviepy
|
| 34 |
|
| 35 |
+
RUN --mount=secret,id=DATA_TOKEN,target=/run/secrets/data_token
|
| 36 |
RUN ./.pixi/envs/default/bin/python /app/code/download_pre_datas.py
|
| 37 |
|
| 38 |
CMD ["./.pixi/envs/default/bin/python", "/app/code/web_server.py"]
|
download_pre_datas.py
CHANGED
|
@@ -4,8 +4,7 @@ from pathlib import Path
|
|
| 4 |
|
| 5 |
from huggingface_hub import snapshot_download
|
| 6 |
|
| 7 |
-
|
| 8 |
-
assert DATA_TOKEN is not None
|
| 9 |
|
| 10 |
def unzip(file):
|
| 11 |
file_path = file.as_posix()
|
|
|
|
| 4 |
|
| 5 |
from huggingface_hub import snapshot_download
|
| 6 |
|
| 7 |
+
token = open('/run/secrets/data_token').read().strip()
|
|
|
|
| 8 |
|
| 9 |
def unzip(file):
|
| 10 |
file_path = file.as_posix()
|