Skip to content

Commit

Permalink
use --break-system-packages with pip install
Browse files Browse the repository at this point in the history
now required because of the ubuntu 24.04 upgrade bringing in a newer python
  • Loading branch information
bhearsum committed Jan 10, 2025
1 parent 996ab9e commit dc357a1
Show file tree
Hide file tree
Showing 35 changed files with 87 additions and 87 deletions.
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ tasks:
desc: Installs the taskgraph requirements.
internal: true
cmds:
- poetry run --directory ./taskgraph -- pip3 install -r taskcluster/requirements.txt
- poetry run --directory ./taskgraph -- pip3 install --break-system-packages -r taskcluster/requirements.txt

taskgraph-validate:
desc: Validates Taskcluster task graph locally
Expand Down
2 changes: 1 addition & 1 deletion docs/tracking.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ The parser can be built as a distinct package to make developments easier using

On a virtual environment, you can install the package in editable mode (i.e from the local folder):
```sh
$ pip install -e ./tracking
$ pip install --break-system-packages -e ./tracking
```

### Extend supported Marian metrics
Expand Down
2 changes: 1 addition & 1 deletion pipeline/clean/tools/langid_fasttext.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# ./langid-fasttext.py < sents.txt > code-tab-sents.txt
#
# Installation:
# pip3 install pybind11 fasttext --user
# pip3 install --break-system-packages pybind11 fasttext --user
#
# Parallelize:
# cat sents.txt | parallel --pipe -k -j16 --block 20M ./langid-fasttext.py > code-tab-sents.txt
Expand Down
2 changes: 1 addition & 1 deletion pipeline/setup/install-kenlm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ cmake .. -DKENLM_MAX_ORDER=7 -DCMAKE_INSTALL_PREFIX:PATH="${BIN}/kenlm"
make -j "${threads}" install
cd ..

python -m pip install . --install-option="--max_order 7"
python -m pip install --break-system-packages . --install-option="--max_order 7"

echo "###### Done: Installing kenlm"
4 changes: 2 additions & 2 deletions taskcluster/kinds/alignments-backtranslated/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/alignments/requirements/alignments.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/alignments/requirements/alignments.txt &&
export BIN=$MOZ_FETCHES_DIR &&
export PATH=$PATH:$MOZ_FETCHES_DIR &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
Expand Down
4 changes: 2 additions & 2 deletions taskcluster/kinds/alignments-original/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/alignments/requirements/alignments.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/alignments/requirements/alignments.txt &&
export BIN=$MOZ_FETCHES_DIR &&
export PATH=$PATH:$MOZ_FETCHES_DIR &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
Expand Down
4 changes: 2 additions & 2 deletions taskcluster/kinds/alignments-student/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/alignments/requirements/alignments.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/alignments/requirements/alignments.txt &&
export BIN=$MOZ_FETCHES_DIR &&
export PATH=$PATH:$MOZ_FETCHES_DIR &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
Expand Down
4 changes: 2 additions & 2 deletions taskcluster/kinds/analyze-corpus/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/data/requirements/analyze.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/data/requirements/analyze.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH
&&
python3 $VCS_PATH/pipeline/data/analyze.py
Expand Down
4 changes: 2 additions & 2 deletions taskcluster/kinds/analyze-mono/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ task-defaults:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/data/requirements/analyze.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/data/requirements/analyze.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/data/analyze.py
--file_location $MOZ_FETCHES_DIR/{dataset_sanitized}.{locale}.zst
Expand Down
6 changes: 3 additions & 3 deletions taskcluster/kinds/bicleaner-model/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ tasks:
- bash
- -c
- >-
pip install $MOZ_FETCHES_DIR/cyhunspell-2.0.3-cp310-cp310-linux_x86_64.whl &&
pip install $MOZ_FETCHES_DIR/kenlm-0.0.0-cp310-cp310-linux_x86_64.whl &&
pip install -r $VCS_PATH/pipeline/bicleaner/requirements/bicleaner-ai.txt &&
pip install --break-system-packages $MOZ_FETCHES_DIR/cyhunspell-2.0.3-cp310-cp310-linux_x86_64.whl &&
pip install --break-system-packages $MOZ_FETCHES_DIR/kenlm-0.0.0-cp310-cp310-linux_x86_64.whl &&
pip install --break-system-packages -r $VCS_PATH/pipeline/bicleaner/requirements/bicleaner-ai.txt &&
export PATH=$PATH:~/.local/bin &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/bicleaner/download_pack.py
Expand Down
6 changes: 3 additions & 3 deletions taskcluster/kinds/bicleaner/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ tasks:
# 4) number of threads to use - auto means nproc
# 5) "pack dir" - which needs to be where the `bicleaner-src-trg` fetch was unpacked to
- >-
pip install $MOZ_FETCHES_DIR/cyhunspell-2.0.3-cp310-cp310-linux_x86_64.whl &&
pip install $MOZ_FETCHES_DIR/kenlm-0.0.0-cp310-cp310-linux_x86_64.whl &&
pip install -r {bicleaner_reqs} &&
pip install --break-system-packages $MOZ_FETCHES_DIR/cyhunspell-2.0.3-cp310-cp310-linux_x86_64.whl &&
pip install --break-system-packages $MOZ_FETCHES_DIR/kenlm-0.0.0-cp310-cp310-linux_x86_64.whl &&
pip install --break-system-packages -r {bicleaner_reqs} &&
export PATH=$PATH:~/.local/bin &&
$VCS_PATH/pipeline/bicleaner/bicleaner.sh
$MOZ_FETCHES_DIR/{dataset_sanitized}
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/kinds/clean-corpus/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ tasks:
- bash
- -c
- >-
pip install -r $VCS_PATH/pipeline/clean/requirements/clean.txt &&
pip install --break-system-packages -r $VCS_PATH/pipeline/clean/requirements/clean.txt &&
if [ ${USE_OPUSCLEANER} == "true" ]; then dir="clean/opuscleaner"; else dir="clean"; fi &&
$VCS_PATH/pipeline/${dir}/clean-corpus.sh
$MOZ_FETCHES_DIR/{dataset_sanitized}
Expand Down
52 changes: 26 additions & 26 deletions taskcluster/kinds/dataset/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/data/requirements/data.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/data/requirements/data.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/data/dataset_importer.py
--type corpus
Expand All @@ -93,8 +93,8 @@ tasks:
- bash
- -cx
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/data/requirements/data.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/data/requirements/data.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 -u $VCS_PATH/pipeline/data/dataset_importer.py
--type corpus
Expand Down Expand Up @@ -122,8 +122,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/data/requirements/data.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/data/requirements/data.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/data/dataset_importer.py
--type corpus
Expand Down Expand Up @@ -151,8 +151,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/data/requirements/data.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/data/requirements/data.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/data/dataset_importer.py
--type corpus
Expand Down Expand Up @@ -186,8 +186,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/data/requirements/data.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/data/requirements/data.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/data/download-mono.py
--dataset {dataset}
Expand Down Expand Up @@ -219,8 +219,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/data/requirements/data.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/data/requirements/data.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/data/download-mono.py
--dataset {dataset}
Expand Down Expand Up @@ -252,8 +252,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/data/requirements/data.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/data/requirements/data.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/data/download-mono.py
--dataset {dataset}
Expand Down Expand Up @@ -285,8 +285,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/data/requirements/data.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/data/requirements/data.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/data/download-mono.py
--dataset {dataset}
Expand Down Expand Up @@ -322,8 +322,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/data/requirements/data.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/data/requirements/data.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/data/download-mono.py
--dataset {dataset}
Expand Down Expand Up @@ -361,8 +361,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/data/requirements/data.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/data/requirements/data.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/data/download-mono.py
--dataset {dataset}
Expand All @@ -389,8 +389,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/data/requirements/data.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/data/requirements/data.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/data/dataset_importer.py
--type corpus
Expand Down Expand Up @@ -424,8 +424,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/data/requirements/data.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/data/requirements/data.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/data/download-mono.py
--dataset {dataset}
Expand Down Expand Up @@ -458,8 +458,8 @@ tasks:
- bash
- -c
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/data/requirements/data.txt &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/data/requirements/data.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/data/download-mono.py
--dataset {dataset}
Expand Down
6 changes: 3 additions & 3 deletions taskcluster/kinds/evaluate-quantized/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ tasks:
- >-
export PATH=$PATH:~/.local/bin &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
pip install --upgrade pip &&
pip install -r $VCS_PATH/pipeline/eval/requirements/eval.txt &&
pip install $VCS_PATH/tracking &&
pip install --break-system-packages --upgrade pip &&
pip install --break-system-packages -r $VCS_PATH/pipeline/eval/requirements/eval.txt &&
pip install --break-system-packages $VCS_PATH/tracking &&
zstd --rm -d $MOZ_FETCHES_DIR/lex.s2t.pruned.zst &&
$VCS_PATH/pipeline/eval/eval.py
--src {src_locale}
Expand Down
6 changes: 3 additions & 3 deletions taskcluster/kinds/evaluate-teacher-ensemble/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ tasks:
- >-
export PATH=$PATH:~/.local/bin &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
pip install --upgrade pip &&
pip install -r $VCS_PATH/pipeline/eval/requirements/eval.txt &&
pip install $VCS_PATH/tracking &&
pip install --break-system-packages --upgrade pip &&
pip install --break-system-packages -r $VCS_PATH/pipeline/eval/requirements/eval.txt &&
pip install --break-system-packages $VCS_PATH/tracking &&
sed -i -e "s,- .*fetches,- $MOZ_FETCHES_DIR," $TASK_WORKDIR/fetches/*.yml &&
sed -i -e "s,- .*artifacts,- $MOZ_FETCHES_DIR," $TASK_WORKDIR/fetches/*.yml &&
$VCS_PATH/pipeline/eval/eval.py
Expand Down
6 changes: 3 additions & 3 deletions taskcluster/kinds/evaluate/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ task-defaults:
- >-
export PATH=$PATH:~/.local/bin &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
pip install --upgrade pip &&
pip install -r $VCS_PATH/pipeline/eval/requirements/eval.txt &&
pip install $VCS_PATH/tracking &&
pip install --break-system-packages --upgrade pip &&
pip install --break-system-packages -r $VCS_PATH/pipeline/eval/requirements/eval.txt &&
pip install --break-system-packages $VCS_PATH/tracking &&
sed -i -e "s,- .*fetches,- $MOZ_FETCHES_DIR," $TASK_WORKDIR/fetches/*.yml &&
sed -i -e "s,- .*artifacts,- $MOZ_FETCHES_DIR," $TASK_WORKDIR/fetches/*.yml &&
$VCS_PATH/pipeline/eval/eval.py
Expand Down
4 changes: 2 additions & 2 deletions taskcluster/kinds/extract-best/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ tasks:
- >-
zstd -d --rm $MOZ_FETCHES_DIR/*.zst &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
pip install --upgrade pip &&
pip install -r $VCS_PATH/pipeline/translate/requirements/extract_best.txt &&
pip install --break-system-packages --upgrade pip &&
pip install --break-system-packages -r $VCS_PATH/pipeline/translate/requirements/extract_best.txt &&
python3 $VCS_PATH/pipeline/translate/extract_best.py
--nbest "$MOZ_FETCHES_DIR/file.{this_chunk}.nbest"
--references "$MOZ_FETCHES_DIR/file.{this_chunk}.ref"
Expand Down
6 changes: 3 additions & 3 deletions taskcluster/kinds/finetune-student/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ tasks:
- bash
- -cx
- >-
pip3 install --upgrade pip setuptools &&
pip3 install -r $VCS_PATH/pipeline/train/requirements/train.txt &&
pip3 install $VCS_PATH/tracking &&
pip3 install --break-system-packages --upgrade pip setuptools &&
pip3 install --break-system-packages -r $VCS_PATH/pipeline/train/requirements/train.txt &&
pip3 install --break-system-packages $VCS_PATH/tracking &&
export PATH="$HOME/.local/bin:$PATH" &&
export MARIAN=$MOZ_FETCHES_DIR &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/kinds/merge-corpus/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ tasks:
- bash
- -c
- >-
pip install -r $VCS_PATH/pipeline/clean/requirements/merge.txt &&
pip install --break-system-packages -r $VCS_PATH/pipeline/clean/requirements/merge.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/clean/merge-corpus.py
--src {src_locale}
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/kinds/merge-devset/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ tasks:
- bash
- -c
- >-
pip install -r $VCS_PATH/pipeline/clean/requirements/merge.txt &&
pip install --break-system-packages -r $VCS_PATH/pipeline/clean/requirements/merge.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/clean/merge-corpus.py
--src {src_locale}
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/kinds/merge-mono/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ task-defaults:
# 2) max_sentences
# 3) datasets
- >-
pip install -r $VCS_PATH/pipeline/clean/requirements/merge.txt &&
pip install --break-system-packages -r $VCS_PATH/pipeline/clean/requirements/merge.txt &&
export PYTHONPATH=$PYTHONPATH:$VCS_PATH &&
python3 $VCS_PATH/pipeline/clean/merge-mono.py
--parallel_corpus $MOZ_FETCHES_DIR/corpus/corpus.{locale}.zst
Expand Down
Loading

0 comments on commit dc357a1

Please sign in to comment.