添加启动脚本和 HF_HOME 环境变量

This commit is contained in:
2024-01-26 11:37:13 +08:00
parent 766ac8704a
commit 773eb8a1bf
3 changed files with 11 additions and 2 deletions

3
.gitignore vendored
View File

@@ -1,2 +1,3 @@
__pycache__ __pycache__
/venv /venv
/huggingface

View File

@@ -6,8 +6,10 @@ WORKDIR /app
COPY ./requirements_version.txt . COPY ./requirements_version.txt .
RUN pip install -r requirements_version.txt --no-cache-dir RUN pip install -r requirements_version.txt --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple
COPY . . COPY . .
RUN python acge_embedding.py
CMD ["python", "main.py"] CMD ["python", "main.py"]

6
start.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
export HF_HOME="$(pwd)/huggingface"
echo HF_HOME is $HF_HOME
source venv/bin/activate
python3 main.py