From 773eb8a1bfbc0c0f2664b8cdfe105f71e4a9de33 Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Fri, 26 Jan 2024 11:37:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=90=AF=E5=8A=A8=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E5=92=8C=20HF=5FHOME=20=E7=8E=AF=E5=A2=83=E5=8F=98?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- Dockerfile | 4 +++- start.sh | 6 ++++++ 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100755 start.sh diff --git a/.gitignore b/.gitignore index 3af6a7b..d3d8961 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ __pycache__ -/venv \ No newline at end of file +/venv +/huggingface diff --git a/Dockerfile b/Dockerfile index 8cf085f..fcd281b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,10 @@ WORKDIR /app 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 . . +RUN python acge_embedding.py + CMD ["python", "main.py"] diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..7a20935 --- /dev/null +++ b/start.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +export HF_HOME="$(pwd)/huggingface" +echo HF_HOME is $HF_HOME +source venv/bin/activate +python3 main.py