Skip to content

Commit 4bced84

Browse files
committed
fix(docker): only install torch cpu
1 parent 2e9d981 commit 4bced84

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ ENV PYTHONUNBUFFERED True
66
# Setup local workdir and dependencies
77
WORKDIR /app
88

9-
# Install python dependencies.
9+
# Install torch for CPU only, since the model runs faster on CPU, and this results in and smaller docker image
10+
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
11+
# TODO: use executorch https://docs.pytorch.org/executorch/stable/getting-started.html for even smaller image size
12+
13+
# Install other python dependencies.
1014
ADD ./pyproject.toml ./pyproject.toml
11-
RUN mkdir -p sign_language_segmentation/src/utils
12-
RUN touch README.md
15+
RUN mkdir -p sign_language_segmentation/src/utils && touch README.md
1316
RUN pip install --no-cache-dir ".[server]"
1417

1518
# Copy local code to the container image.

0 commit comments

Comments
 (0)