Spaces:
Runtime error
Runtime error
Commit
·
9fec85a
1
Parent(s):
f5cd881
new
Browse files- Dockerfile +5 -5
- requirements.txt +0 -1
Dockerfile
CHANGED
@@ -30,19 +30,19 @@ USER user
|
|
30 |
ENV HOME=/home/user
|
31 |
WORKDIR ${HOME}/app
|
32 |
|
33 |
-
#
|
34 |
COPY --chown=user:user requirements.txt /tmp/requirements.txt
|
35 |
RUN conda run -n videograin pip install --no-cache-dir -r /tmp/requirements.txt
|
36 |
|
|
|
|
|
|
|
37 |
# 复制应用代码
|
38 |
COPY --chown=user:user . ${HOME}/app
|
39 |
|
40 |
-
#
|
41 |
ENV PATH=/opt/conda/envs/videograin/bin:$PATH \
|
42 |
PYTHONUNBUFFERED=1
|
43 |
|
44 |
-
# 如有需要可开放端口(例如使用 gradio 的情况)
|
45 |
-
# EXPOSE 7860
|
46 |
-
|
47 |
# 默认启动命令
|
48 |
CMD ["python", "app.py"]
|
|
|
30 |
ENV HOME=/home/user
|
31 |
WORKDIR ${HOME}/app
|
32 |
|
33 |
+
# 复制本地 requirements.txt 进容器,并在 “videograin” 环境中安装 pip 依赖
|
34 |
COPY --chown=user:user requirements.txt /tmp/requirements.txt
|
35 |
RUN conda run -n videograin pip install --no-cache-dir -r /tmp/requirements.txt
|
36 |
|
37 |
+
# 强制安装指定版本的 huggingface-hub 和 gradio
|
38 |
+
RUN conda run -n videograin pip install --no-cache-dir huggingface-hub==0.17.3 gradio==3.44.4
|
39 |
+
|
40 |
# 复制应用代码
|
41 |
COPY --chown=user:user . ${HOME}/app
|
42 |
|
43 |
+
# 设置环境变量,确保使用 “videograin” 环境中的 Python
|
44 |
ENV PATH=/opt/conda/envs/videograin/bin:$PATH \
|
45 |
PYTHONUNBUFFERED=1
|
46 |
|
|
|
|
|
|
|
47 |
# 默认启动命令
|
48 |
CMD ["python", "app.py"]
|
requirements.txt
CHANGED
@@ -67,5 +67,4 @@ scikit-image==0.24.0
|
|
67 |
gdown==5.1.0
|
68 |
basicsr-fixed
|
69 |
huggingface-hub==0.17.3
|
70 |
-
xformers==0.0.27
|
71 |
gradio==3.44.4
|
|
|
67 |
gdown==5.1.0
|
68 |
basicsr-fixed
|
69 |
huggingface-hub==0.17.3
|
|
|
70 |
gradio==3.44.4
|