Skip to content

Commit cddec03

Browse files
authored
container: Eliminate PIP cache and install CPU-only torch (#226)
1 parent 5493794 commit cddec03

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

util/container/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ ARG VIRTUAL_ENV="/root/.venvs/snitch_cluster"
8181
RUN python${PYTHON_VERSION} -m venv ${VIRTUAL_ENV}
8282

8383
# Upgrade pip and install packages using the virtual environment's pip
84+
# Don't cache pip files to avoid polluting the docker container
85+
# Install torch from the cpu only index to avoid installing the GPU versio
86+
ARG PIP_NO_CACHE_DIR=1
8487
RUN ${VIRTUAL_ENV}/bin/pip install --upgrade pip && \
88+
${VIRTUAL_ENV}/bin/pip install torch --index-url https://download.pytorch.org/whl/cpu && \
8589
${VIRTUAL_ENV}/bin/pip install .
8690

8791
# Copy the tools from the builder stage

0 commit comments

Comments
 (0)