Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
Jupyter Docker Stacks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Jupyter Docker Stacks
Commits
0329eece
Commit
0329eece
authored
Nov 11, 2018
by
Đặng Minh Dũng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing inline script problem
parent
50d1eb9e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
32 deletions
+30
-32
base-notebook/fix-permissions
base-notebook/fix-permissions
+1
-1
base-notebook/start-notebook.sh
base-notebook/start-notebook.sh
+4
-6
base-notebook/start-singleuser.sh
base-notebook/start-singleuser.sh
+2
-2
base-notebook/start.sh
base-notebook/start.sh
+23
-23
No files found.
base-notebook/fix-permissions
View file @
0329eece
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
set
-e
set
-e
for
d
in
$@
;
do
for
d
in
"
$@
"
;
do
find
"
$d
"
\
find
"
$d
"
\
!
\(
\
!
\(
\
-group
$NB_GID
\
-group
$NB_GID
\
...
...
base-notebook/start-notebook.sh
View file @
0329eece
...
@@ -6,11 +6,9 @@ set -e
...
@@ -6,11 +6,9 @@ set -e
if
[[
!
-z
"
${
JUPYTERHUB_API_TOKEN
}
"
]]
;
then
if
[[
!
-z
"
${
JUPYTERHUB_API_TOKEN
}
"
]]
;
then
# launched by JupyterHub, use single-user entrypoint
# launched by JupyterHub, use single-user entrypoint
exec
/usr/local/bin/start-singleuser.sh
$*
exec
/usr/local/bin/start-singleuser.sh
"
$@
"
elif
[[
!
-z
"
${
JUPYTER_ENABLE_LAB
}
"
]]
;
then
.
/usr/local/bin/start.sh jupyter lab
"
$@
"
else
else
if
[[
!
-z
"
${
JUPYTER_ENABLE_LAB
}
"
]]
;
then
.
/usr/local/bin/start.sh jupyter notebook
"
$@
"
.
/usr/local/bin/start.sh jupyter lab
$*
else
.
/usr/local/bin/start.sh jupyter notebook
$*
fi
fi
fi
base-notebook/start-singleuser.sh
View file @
0329eece
...
@@ -37,7 +37,7 @@ fi
...
@@ -37,7 +37,7 @@ fi
if
[
!
-z
"
$JUPYTER_ENABLE_LAB
"
]
;
then
if
[
!
-z
"
$JUPYTER_ENABLE_LAB
"
]
;
then
NOTEBOOK_BIN
=
"jupyter labhub"
NOTEBOOK_BIN
=
"jupyter labhub"
else
else
NOTEBOOK_BIN
=
jupyterhub-singleuser
NOTEBOOK_BIN
=
"jupyterhub-singleuser"
fi
fi
.
/usr/local/bin/start.sh
$NOTEBOOK_BIN
$NOTEBOOK_ARGS
$@
.
/usr/local/bin/start.sh
$NOTEBOOK_BIN
$NOTEBOOK_ARGS
"
$@
"
base-notebook/start.sh
View file @
0329eece
...
@@ -6,9 +6,9 @@ set -e
...
@@ -6,9 +6,9 @@ set -e
# Exec the specified command or fall back on bash
# Exec the specified command or fall back on bash
if
[
$#
-eq
0
]
;
then
if
[
$#
-eq
0
]
;
then
cmd
=
bash
cmd
=
(
"bash"
)
else
else
cmd
=
$*
cmd
=
(
"
$@
"
)
fi
fi
run-hooks
()
{
run-hooks
()
{
...
@@ -17,7 +17,7 @@ run-hooks () {
...
@@ -17,7 +17,7 @@ run-hooks () {
return
return
fi
fi
echo
"
$0
: running hooks in
$1
"
echo
"
$0
: running hooks in
$1
"
for
f
in
"
$1
"
/
*
;
do
for
f
in
"
$1
/"
*
;
do
case
"
$f
"
in
case
"
$f
"
in
*
.sh
)
*
.sh
)
echo
"
$0
: running
$f
"
echo
"
$0
: running
$f
"
...
@@ -86,7 +86,7 @@ if [ $(id -u) == 0 ] ; then
...
@@ -86,7 +86,7 @@ if [ $(id -u) == 0 ] ; then
if
[
"
$NB_GID
"
!=
$(
id
-g
$NB_USER
)
]
;
then
if
[
"
$NB_GID
"
!=
$(
id
-g
$NB_USER
)
]
;
then
echo
"Add
$NB_USER
to group:
$NB_GID
"
echo
"Add
$NB_USER
to group:
$NB_GID
"
groupadd
-g
$NB_GID
-o
${
NB_GROUP
:-${
NB_USER
}}
groupadd
-g
$NB_GID
-o
${
NB_GROUP
:-${
NB_USER
}}
usermod
-g
$NB_GID
-a
-G
$NB_GID
,
100
$NB_USER
usermod
-g
$NB_GID
-aG
100
$NB_USER
fi
fi
# Enable sudo if requested
# Enable sudo if requested
...
@@ -101,8 +101,8 @@ if [ $(id -u) == 0 ] ; then
...
@@ -101,8 +101,8 @@ if [ $(id -u) == 0 ] ; then
# Exec the command as NB_USER with the PATH and the rest of
# Exec the command as NB_USER with the PATH and the rest of
# the environment preserved
# the environment preserved
run-hooks /usr/local/bin/before-notebook.d
run-hooks /usr/local/bin/before-notebook.d
echo
"Executing the command:
$
cmd
"
echo
"Executing the command:
$
{
cmd
[@]
}
"
exec sudo
-E
-H
-u
$NB_USER
PATH
=
$PATH
XDG_CACHE_HOME
=
/home/
$NB_USER
/.cache
PYTHONPATH
=
$PYTHONPATH
$cmd
exec sudo
-E
-H
-u
$NB_USER
PATH
=
$PATH
XDG_CACHE_HOME
=
/home/
$NB_USER
/.cache
PYTHONPATH
=
$PYTHONPATH
"
${
cmd
[@]
}
"
else
else
if
[[
"
$NB_UID
"
==
"
$(
id
-u
jovyan
)
"
&&
"
$NB_GID
"
==
"
$(
id
-g
jovyan
)
"
]]
;
then
if
[[
"
$NB_UID
"
==
"
$(
id
-u
jovyan
)
"
&&
"
$NB_GID
"
==
"
$(
id
-g
jovyan
)
"
]]
;
then
# User is not attempting to override user/group via environment
# User is not attempting to override user/group via environment
...
@@ -145,6 +145,6 @@ else
...
@@ -145,6 +145,6 @@ else
# Execute the command
# Execute the command
run-hooks /usr/local/bin/before-notebook.d
run-hooks /usr/local/bin/before-notebook.d
echo
"Executing the command:
$
cmd
"
echo
"Executing the command:
$
{
cmd
[@]
}
"
exec
$cmd
exec
"
${
cmd
[@]
}
"
fi
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment