Skip to content

Commit 2f74e2c

Browse files
sharvil10atheo89
authored andcommitted
oneapi basekit vars set for pytorch-cpu
1 parent 17c653c commit 2f74e2c

File tree

7 files changed

+26
-7
lines changed

7 files changed

+26
-7
lines changed

intel/runtimes/pytorch/ubi9-python-3.9/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ RUN echo "Installing softwares and packages" && \
4040
fix-permissions /opt/app-root -P
4141

4242
ENV CPU_ENV=/opt/app-root-cpu
43+
ENV GPU_ENV=/opt/app-root
44+
4345
COPY --chown=1001:0 Pipfile.lock.cpu ${CPU_ENV}/Pipfile.lock
4446

4547
#CPU env

jupyter/intel/pytorch/ubi9-python-3.9/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ RUN echo "Installing softwares and packages" && \
2323
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
2424
chmod -R g+w /opt/app-root/lib/python3.9/site-packages && \
2525
fix-permissions /opt/app-root -P
26+
2627

2728
#Replacing kernel manually with oneapi variable setting script
28-
COPY --chown=1001:0 start-gpu-kernel /opt/app-root/bin/start-gpu-kernel
29+
COPY --chown=1001:0 start-kernel /opt/app-root/bin/start-kernel
2930
COPY --chown=1001:0 kernel-gpu.json /opt/app-root/share/jupyter/kernels/python3/kernel.json
3031
COPY --chown=1001:0 start-notebook.sh /opt/app-root/bin
3132
COPY --chown=1001:0 builder /opt/app-root/builder
@@ -45,6 +46,8 @@ RUN source ${CPU_ENV}/bin/activate && \
4546
fix-permissions ${CPU_ENV} -P && \
4647
chmod -R g+w /opt/app-root/src
4748

49+
COPY --chown=1001:0 kernel-cpu.json /opt/app-root/share/jupyter/kernels/pytorch-cpu/kernel.json
50+
4851
WORKDIR /opt/app-root/src
4952

5053
ENV JUPYTER_PRELOAD_REPOS="https://github.com/IntelAI/oneAPI-samples"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"argv": [
3+
"/opt/app-root/bin/start-kernel",
4+
"-f",
5+
"{connection_file}"
6+
],
7+
"env": {"JUPYTER_ENV":"/opt/app-root-cpu"},
8+
"display_name": "pytorch-cpu",
9+
"language": "python",
10+
"metadata": {
11+
"debugger": true
12+
}
13+
}

jupyter/intel/pytorch/ubi9-python-3.9/kernel-gpu.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"argv": [
3-
"/opt/app-root/bin/start-gpu-kernel",
3+
"/opt/app-root/bin/start-kernel",
44
"-f",
55
"{connection_file}"
66
],
7+
"env": {"JUPYTER_ENV":"/opt/app-root"},
78
"display_name": "pytorch-gpu",
89
"language": "python",
910
"metadata": {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
source /opt/intel/oneapi/setvars.sh
4+
5+
exec ${JUPYTER_ENV}/bin/python -m ipykernel_launcher $@

jupyter/intel/tensorflow/ubi9-python-3.9/start-gpu-kernel

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)