michaelmccamy commited on
Commit
f8f00c8
·
verified ·
1 Parent(s): 3f38c4f

Deploy backend

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -2
Dockerfile CHANGED
@@ -7,9 +7,10 @@ USER user
7
  ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH HF_HOME=/home/user/.cache/huggingface
8
  WORKDIR /home/user/app
9
 
10
- # CPU-only torch is a fraction of the size of the default CUDA build.
 
11
  COPY --chown=user requirements.txt .
12
- RUN pip install --no-cache-dir --user torch --index-url https://download.pytorch.org/whl/cpu \
13
  && pip install --no-cache-dir --user -r requirements.txt
14
 
15
  # Download the models during the build so the first request isn't slow.
 
7
  ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH HF_HOME=/home/user/.cache/huggingface
8
  WORKDIR /home/user/app
9
 
10
+ # CPU-only torch is a fraction of the size of the default CUDA build. torchvision (pulled in by timm)
11
+ # must come from the same index, or it won't match torch and transformers fails to import.
12
  COPY --chown=user requirements.txt .
13
+ RUN pip install --no-cache-dir --user torch torchvision --index-url https://download.pytorch.org/whl/cpu \
14
  && pip install --no-cache-dir --user -r requirements.txt
15
 
16
  # Download the models during the build so the first request isn't slow.