This repository was archived by the owner on Jun 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -27,13 +27,13 @@ jobs:
2727 - name : checkout repo
2828 uses : actions/checkout@v2
2929
30-
3130 - name : Cache MedMen Model
3231 id : cache-medmen
3332 uses : actions/cache@v4
3433 with :
3534 path : models/medmen
3635 key : medmen-${{ hashFiles('scripts/download_medmen.sh') }}
36+
3737 - name : Install Python 3
3838 uses : actions/setup-python@v5
3939 with :
Original file line number Diff line number Diff line change @@ -5,10 +5,16 @@ ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
55# Set the python path and preapre the base layer
66WORKDIR /cat
77COPY ./requirements.txt /cat
8- RUN pip install --upgrade pip
98
10- # Install requirements for the app
11- RUN pip3 install --no-cache-dir -r requirements.txt
9+ # Install Python dependencies
10+ ARG USE_CPU_TORCH=false
11+ # NOTE: Allow building without GPU so as to lower image size (disabled by default)
12+ RUN pip install -U pip && \
13+ if [ "${USE_CPU_TORCH}" = "true" ]; then \
14+ pip install --no-cache-dir -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu/; \
15+ else \
16+ pip install --no-cache-dir -r requirements.txt; \
17+ fi
1218
1319# Get the spacy model
1420ARG SPACY_MODELS="en_core_web_sm en_core_web_md en_core_web_lg"
You can’t perform that action at this time.
0 commit comments