ffreemt commited on
Commit
42faefb
1 Parent(s): 039548e
Files changed (2) hide show
  1. Dockerfile +2 -2
  2. m3_server.py +1 -1
Dockerfile CHANGED
@@ -21,7 +21,7 @@ RUN pip install --no-cache-dir --upgrade pip && \
21
  # CMD ["TRANSFORMERS_CACHE=./", "infinity_emb", "--model-name-or-path", "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", "--port", "7860"]
22
 
23
  # CMD ["sh", "-c", "HF_HOME=/tmp/cache", "python", "m3_server.py"]
24
- # ["sh", "-c", "'FOO=BAR python app.py'"]
25
 
26
  # CMD ["sh", "start-m3-server.sh"] # OK
27
- CMD ["python", "m3_server.py"]
 
21
  # CMD ["TRANSFORMERS_CACHE=./", "infinity_emb", "--model-name-or-path", "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", "--port", "7860"]
22
 
23
  # CMD ["sh", "-c", "HF_HOME=/tmp/cache", "python", "m3_server.py"]
24
+ # CMD ["python", "m3_server.py"]
25
 
26
  # CMD ["sh", "start-m3-server.sh"] # OK
27
+ ["sh", "-c", "'FOO=BAR python app.py'"]
m3_server.py CHANGED
@@ -17,7 +17,7 @@ from starlette.status import HTTP_504_GATEWAY_TIMEOUT
17
  Path("/tmp/cache").mkdir(exist_ok=True)
18
  os.environ["HF_HOME"] = "/tmp/cache"
19
  os.environ["TRANSFORMERS_CACHE"] = "/tmp/cache"
20
- # does not quite work, need Path("/tmp/cache").mkdir(exist_ok=True)?
21
 
22
  batch_size = 2 # gpu batch_size in order of your available vram
23
  max_request = 10 # max request for future improvements on api calls / gpu batches (for now is pretty basic)
 
17
  Path("/tmp/cache").mkdir(exist_ok=True)
18
  os.environ["HF_HOME"] = "/tmp/cache"
19
  os.environ["TRANSFORMERS_CACHE"] = "/tmp/cache"
20
+ # does not quite work
21
 
22
  batch_size = 2 # gpu batch_size in order of your available vram
23
  max_request = 10 # max request for future improvements on api calls / gpu batches (for now is pretty basic)