|
14 | 14 | "linux": [{
|
15 | 15 | "env": [
|
16 | 16 | "source /intel/oneapi/intelpython/bin/activate",
|
| 17 | + "conda activate base", |
| 18 | + "pip install uv notebook", |
| 19 | + "uv init", |
| 20 | + "uv python pin $(which python)", |
| 21 | + "uv venv --system-site-packages", |
| 22 | + "uv add -r requirements.txt", |
| 23 | + "uv add numpy==1.26.4", |
| 24 | + "uv run ipython kernel install --user --name=tensorflow", |
| 25 | + "uv run ipython kernel install --user --name=tensorflow-gpu", |
| 26 | + |
17 | 27 | "conda activate tensorflow",
|
18 |
| - "pip install -r requirements.txt --no-deps", |
19 |
| - "pip install tensorflow==2.15.0.post1", |
20 |
| - "pip install jupyter ipykernel", |
21 |
| - "python -m ipykernel install --user --name=tensorflow", |
| 28 | + "pip install uv notebook", |
22 | 29 | "conda deactivate",
|
23 | 30 | "conda activate tensorflow-gpu",
|
24 |
| - "pip install -r requirements.txt --no-deps", |
25 |
| - "pip install tensorflow==2.15.0.post1", |
26 |
| - "pip install jupyter ipykernel", |
27 |
| - "python -m ipykernel install --user --name=tensorflow-gpu", |
| 31 | + "pip install uv notebook", |
28 | 32 | "conda deactivate"
|
29 | 33 | ],
|
30 | 34 | "id": "itex_sample_test",
|
31 | 35 | "steps": [
|
32 | 36 | "conda activate tensorflow",
|
33 |
| - "jupyter nbconvert --to notebook --execute ResNet50_Inference.ipynb" |
| 37 | + "uv python pin $(which python)", |
| 38 | + "uv venv --system-site-packages", |
| 39 | + "jupyter nbconvert --ExecutePreprocessor.enabled=True --ExecutePreprocessor.kernel_name=tensorflow --to notebook --execute ResNet50_Inference.ipynb --output ResNet50_Inference.nbcovert.cpu.ipynb", |
| 40 | + "conda deactivate", |
| 41 | + |
| 42 | + "conda activate tensorflow-gpu", |
| 43 | + "uv python pin $(which python)", |
| 44 | + "uv venv --system-site-packages", |
| 45 | + "jupyter nbconvert --ExecutePreprocessor.enabled=True --ExecutePreprocessor.kernel_name=tensorflow-gpu --to notebook --execute ResNet50_Inference.ipynb --output ResNet50_Inference.nbcovert.gpu.ipynb", |
| 46 | + "conda deactivate" |
34 | 47 | ]
|
35 | 48 | }]
|
36 | 49 | },
|
|
0 commit comments