Skip to content

Commit 8e4da03

Browse files
Use Torch CPU in our docker builds (#191)
* Explicitly use torch cpu
1 parent 5be908f commit 8e4da03

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/build_images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
tags: ${{ steps.base.outputs.tags }}
5454
cache-from: type=registry,ref=${{ steps.login-ecr.outputs.registry }}/dev/ndif_base:cache
5555
cache-to: type=registry,ref=${{ steps.login-ecr.outputs.registry }}/dev/ndif_base:cache,mode=max
56-
56+
5757
- name: Tag the API image
5858
id: api
5959
uses: docker/metadata-action@v5

docker/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RUN apt-get update -y \
1111

1212
# Copy and install base requirements
1313
COPY src/services/base/requirements.in /tmp/requirements.in
14+
RUN uv pip install --system torch --index-url https://download.pytorch.org/whl/cpu
1415
RUN uv pip install --system -r /tmp/requirements.in \
1516
&& find /usr/local/lib/python3.12 -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true \
1617
&& find /usr/local/lib/python3.12 -name "*.pyc" -delete \

0 commit comments

Comments
 (0)