AndresZarta commited on
Commit
de85f6a
·
1 Parent(s): ee17aea

Models Cache in Tmp in the DKfule

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -0
  2. app.py +0 -3
Dockerfile CHANGED
@@ -1,5 +1,7 @@
1
  FROM python:3.9
2
 
 
 
3
  WORKDIR /code
4
 
5
  COPY ./requirements.txt /code/requirements.txt
 
1
  FROM python:3.9
2
 
3
+ ENV TRANSFORMERS_CACHE=/tmp/transformers_cache
4
+
5
  WORKDIR /code
6
 
7
  COPY ./requirements.txt /code/requirements.txt
app.py CHANGED
@@ -6,9 +6,6 @@ from PIL import Image
6
  import io
7
  import base64
8
 
9
- import os
10
- os.environ["TRANSFORMERS_CACHE"] = "/tmp/cache/"
11
-
12
  # Load model configuration
13
  model_config = SamConfig.from_pretrained("facebook/sam-vit-base")
14
  processor = SamProcessor.from_pretrained("facebook/sam-vit-base")
 
6
  import io
7
  import base64
8
 
 
 
 
9
  # Load model configuration
10
  model_config = SamConfig.from_pretrained("facebook/sam-vit-base")
11
  processor = SamProcessor.from_pretrained("facebook/sam-vit-base")