Spaces:
Running
Running
vlff李飞飞
commited on
Commit
•
ebad244
1
Parent(s):
1cff82c
add cache folder
Browse files- Dockerfile +2 -2
- run_server.py +2 -1
Dockerfile
CHANGED
@@ -10,6 +10,6 @@ COPY ./requirements.txt /code/requirements.txt
|
|
10 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
|
12 |
COPY . .
|
13 |
-
RUN mkdir -p ./.cache/huggingface
|
14 |
-
RUN chmod 777 -R ./*
|
15 |
CMD ["python", "run_server.py", "--llm", "Qwen/Qwen-1_8B-Chat", "--model_server", "http://127.0.0.1:7905/v1", "--server_host", "0.0.0.0", "--workstation_port", "7860"]
|
|
|
10 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
|
12 |
COPY . .
|
13 |
+
RUN mkdir -p .cache/huggingface/models--Qwen--Qwen-1_8B-Chat && mkdir -p ./.cache/huggingface/models--Qwen--Qwen-1_8B-Chat
|
14 |
+
RUN chmod 777 -R ./* && chmod 777 -R ./.cache/*
|
15 |
CMD ["python", "run_server.py", "--llm", "Qwen/Qwen-1_8B-Chat", "--model_server", "http://127.0.0.1:7905/v1", "--server_host", "0.0.0.0", "--workstation_port", "7860"]
|
run_server.py
CHANGED
@@ -10,7 +10,8 @@ from pathlib import Path
|
|
10 |
from qwen_agent.log import logger
|
11 |
from qwen_agent.utils.utils import get_local_ip
|
12 |
from qwen_server.schema import GlobalConfig
|
13 |
-
os.environ["TRANSFORMERS_CACHE"] = "
|
|
|
14 |
|
15 |
def parse_args():
|
16 |
parser = argparse.ArgumentParser()
|
|
|
10 |
from qwen_agent.log import logger
|
11 |
from qwen_agent.utils.utils import get_local_ip
|
12 |
from qwen_server.schema import GlobalConfig
|
13 |
+
os.environ["TRANSFORMERS_CACHE"] = ".cache/huggingface/"
|
14 |
+
os.environ["HF_HOME"] = ".cache/huggingface/"
|
15 |
|
16 |
def parse_args():
|
17 |
parser = argparse.ArgumentParser()
|