Skip to content

Commit 6b9660c

Browse files
committed
update: automate image-specific metadata description
1 parent bc5ee8d commit 6b9660c

File tree

5 files changed

+25
-3
lines changed

5 files changed

+25
-3
lines changed

julia/Dockerfile.1.8-ubuntu20.04

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ RUN julia -e 'using IJulia' && \
8787
chmod -R 755 /opt/julia/compiled
8888
SHELL ["/bin/sh", "-c"]
8989
# Install ipython kernelspec
90-
COPY kernel.1.8.json /usr/local/share/jupyter/kernels/julia-1.8/kernel.json
90+
COPY replace_placeholder.sh /etc/backend.ai/replace_placeholder.sh
91+
COPY kernel.json /usr/local/share/jupyter/kernels/julia-1.8/kernel.json
92+
RUN /etc/backend.ai/replace_placeholder.sh && \
93+
rm /etc/backend.ai/replace_placeholder.sh
9194
COPY logo-32x32.png /usr/local/share/jupyter/kernels/julia-1.8/logo-32x32.png
9295
COPY logo-64x64.png /usr/local/share/jupyter/kernels/julia-1.8/logo-64x64.png
9396

julia/kernel.flux.013.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"-i",
66
"--startup-file=yes",
77
"--color=yes",
8-
"/opt/julia/packages/IJulia/6TIq1/src/kernel.jl",
8+
"/opt/julia/packages/IJulia/[PLACEHOLDER]/src/kernel.jl",
99
"{connection_file}"
1010
],
1111
"language": "julia",

julia/kernel.flux.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"display_name": "FluxML 0.13 on Backend.AI",
3+
"argv": [
4+
"/usr/local/julia/bin/julia",
5+
"-i",
6+
"--startup-file=yes",
7+
"--color=yes",
8+
"/opt/julia/packages/IJulia/PLACEHOLDER/src/kernel.jl",
9+
"{connection_file}"
10+
],
11+
"language": "julia",
12+
"env": {}
13+
}

julia/kernel.1.8.json renamed to julia/kernel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"-i",
66
"--startup-file=yes",
77
"--color=yes",
8-
"/opt/julia/packages/IJulia/6TIq1/src/kernel.jl",
8+
"/opt/julia/packages/IJulia/PLACEHOLDER/src/kernel.jl",
99
"{connection_file}"
1010
],
1111
"language": "julia",

julia/replace_placeholder.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
path="/opt/julia/packages/IJulia"
3+
first_dir=$(ls -1 "$path" | head -1)
4+
file="/usr/local/share/jupyter/kernels/julia-1.8/kernel.json"
5+
old_string="PLACEHOLDER"
6+
sed -i "s/$old_string/$first_dir/g" $file

0 commit comments

Comments
 (0)