Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Astrocyte Container Images
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Iterations
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Astrocyte
Astrocyte Container Images
Commits
82afa865
Commit
82afa865
authored
2 years ago
by
Peng Lian
Browse files
Options
Downloads
Patches
Plain Diff
Add Dynamics ports to RStudio
parent
ac24b3c8
Branches
Branches containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
RStudio/4.1.1/Dockerfile
+7
-0
7 additions, 0 deletions
RStudio/4.1.1/Dockerfile
RStudio/4.2.2/Dockerfile
+7
-0
7 additions, 0 deletions
RStudio/4.2.2/Dockerfile
RStudio/run_rstudio_singularity.sh
+8
-5
8 additions, 5 deletions
RStudio/run_rstudio_singularity.sh
with
22 additions
and
5 deletions
RStudio/4.1.1/Dockerfile
+
7
−
0
View file @
82afa865
...
@@ -15,6 +15,13 @@ ENV http_proxy="${http_proxy}" \
...
@@ -15,6 +15,13 @@ ENV http_proxy="${http_proxy}" \
RUN
mkdir
/vizapp
RUN
mkdir
/vizapp
# Config the Rstudio
# Allow root login. Ref. Section 3.2. https://s3.amazonaws.com/rstudio-server/rstudio-server-pro-0.99.903-admin-guide.pdf
# Allow root login. Ref. Section 3.2. https://s3.amazonaws.com/rstudio-server/rstudio-server-pro-0.99.903-admin-guide.pdf
# Usefull for fakeroot function of singularity
# Usefull for fakeroot function of singularity
RUN
/usr/bin/bash
-c
"sed -i 's/^UID_MIN.*/UID_MIN 0/g' /etc/login.defs"
RUN
/usr/bin/bash
-c
"sed -i 's/^UID_MIN.*/UID_MIN 0/g' /etc/login.defs"
ARG
ARG_VIZAPP_PORT=8123
ENV
VIZAPP_PORT=${ARG_VIZAPP_PORT:-8123}
# Change the default port to 8123, which is the one used by Astrocyte
RUN
/usr/bin/bash
-c
"sed -i 's/--server-daemonize 0/--server-daemonize 0 --www-port=
\$
{VIZAPP_PORT}/g' /etc/services.d/rstudio/run"
This diff is collapsed.
Click to expand it.
RStudio/4.2.2/Dockerfile
+
7
−
0
View file @
82afa865
...
@@ -15,6 +15,13 @@ ENV http_proxy="${http_proxy}" \
...
@@ -15,6 +15,13 @@ ENV http_proxy="${http_proxy}" \
RUN
mkdir
/vizapp
RUN
mkdir
/vizapp
# Config the Rstudio
# Allow root login. Ref. Section 3.2. https://s3.amazonaws.com/rstudio-server/rstudio-server-pro-0.99.903-admin-guide.pdf
# Allow root login. Ref. Section 3.2. https://s3.amazonaws.com/rstudio-server/rstudio-server-pro-0.99.903-admin-guide.pdf
# Usefull for fakeroot function of singularity
# Usefull for fakeroot function of singularity
RUN
/usr/bin/bash
-c
"sed -i 's/^UID_MIN.*/UID_MIN 0/g' /etc/login.defs"
RUN
/usr/bin/bash
-c
"sed -i 's/^UID_MIN.*/UID_MIN 0/g' /etc/login.defs"
ARG
ARG_VIZAPP_PORT=8123
ENV
VIZAPP_PORT=${ARG_VIZAPP_PORT:-8123}
# Change the default port to 8123, which is the one used by Astrocyte
RUN
/usr/bin/bash
-c
"sed -i 's/--server-daemonize 0/--server-daemonize 0 --www-port=
\$
{VIZAPP_PORT}/g' /etc/services.d/rstudio/run"
This diff is collapsed.
Click to expand it.
RStudio/run_rstudio_singularity.sh
+
8
−
5
View file @
82afa865
...
@@ -15,7 +15,7 @@ tmpDir=/tmp/$USER/rstudio
...
@@ -15,7 +15,7 @@ tmpDir=/tmp/$USER/rstudio
VIZAPP_HOME
=
"
$tmpDir
/vizapp/"
VIZAPP_HOME
=
"
$tmpDir
/vizapp/"
# dependencies libs of vizapp, space seperated
# dependencies libs of vizapp, space seperated
VIZAPP_LIBS
=
"rmarkdown"
#
VIZAPP_LIBS="rmarkdown"
# user specified path to install the vizapp libs inside the container
# user specified path to install the vizapp libs inside the container
R_LIBS_USER
=
"/vizapp/rlibrary"
R_LIBS_USER
=
"/vizapp/rlibrary"
...
@@ -36,7 +36,7 @@ ln -s /mnt $tmpDir/home/outputDir
...
@@ -36,7 +36,7 @@ ln -s /mnt $tmpDir/home/outputDir
# version and the image to use
# version and the image to use
PACKAGE
=
"rstudio"
PACKAGE
=
"rstudio"
VERSION
=
"4.
2.2
"
VERSION
=
"4.
1.1
"
IMAGE_NAME
=
"git.biohpc.swmed.edu:5050/astrocyte/container/
${
PACKAGE
}
:
${
VERSION
}
"
IMAGE_NAME
=
"git.biohpc.swmed.edu:5050/astrocyte/container/
${
PACKAGE
}
:
${
VERSION
}
"
# name of the local image
# name of the local image
...
@@ -51,6 +51,7 @@ fi
...
@@ -51,6 +51,7 @@ fi
DISABLE_AUTH
=
true
DISABLE_AUTH
=
true
PASSWORD
=
BioHPC
PASSWORD
=
BioHPC
DEFAULT_USER
=
root
DEFAULT_USER
=
root
VIZAPP_PORT
=
8123
# install vizapp libs to customize folder
# install vizapp libs to customize folder
for
lib
in
$VIZAPP_LIBS
;
do
for
lib
in
$VIZAPP_LIBS
;
do
...
@@ -58,22 +59,24 @@ for lib in $VIZAPP_LIBS; do
...
@@ -58,22 +59,24 @@ for lib in $VIZAPP_LIBS; do
SINGULARITYENV_DISABLE_AUTH
=
$DISABLE_AUTH
\
SINGULARITYENV_DISABLE_AUTH
=
$DISABLE_AUTH
\
SINGULARITYENV_PASSWORD
=
$PASSWORD
\
SINGULARITYENV_PASSWORD
=
$PASSWORD
\
SINGULARITYENV_DEFAULT_USER
=
$DEFAULT_USER
\
SINGULARITYENV_DEFAULT_USER
=
$DEFAULT_USER
\
SINGULARITYENV_VIZAPP_PORT
=
$VIZAPP_PORT
\
singularity
exec
-f
-C
-w
-e
\
singularity
exec
-f
-C
-w
-e
\
-H
$tmpDir
/home:/root
\
-H
$tmpDir
/home:/root
\
-B
$outputDir
:/mnt,
$VIZAPP_HOME
:/vizapp,
$tmpDir
/tmp:/tmp
${
singularity_image
}
\
-B
$outputDir
:/mnt,
$VIZAPP_HOME
:/vizapp,
$tmpDir
/tmp:/tmp
${
singularity_image
}
\
R
-e
"if (!require('
$lib
', character.only=TRUE)) {install.packages('
$lib
', dependencies=TRUE, lib='
$R_LIBS_USER
')}"
R
-e
"if (!require('
$lib
', character.only=TRUE)) {install.packages('
$lib
', dependencies=TRUE, lib='
$R_LIBS_USER
')}"
done
done
echo
-e
"
\n
Please visit http://localhost:
8787
to connect to the RStudio server ...
\n
"
echo
-e
"
\n
Please visit http://localhost:
${
VIZAPP_PORT
}
to connect to the RStudio server ...
\n
"
# run vizapp on localhost
# run vizapp on localhost
SINGULARITYENV_R_LIBS_USER
=
${
R_LIBS_USER
}
\
SINGULARITYENV_R_LIBS_USER
=
${
R_LIBS_USER
}
\
SINGULARITYENV_DISABLE_AUTH
=
$DISABLE_AUTH
\
SINGULARITYENV_DISABLE_AUTH
=
$DISABLE_AUTH
\
SINGULARITYENV_PASSWORD
=
$PASSWORD
\
SINGULARITYENV_PASSWORD
=
$PASSWORD
\
SINGULARITYENV_DEFAULT_USER
=
$DEFAULT_USER
\
SINGULARITYENV_DEFAULT_USER
=
$DEFAULT_USER
\
SINGULARITYENV_VIZAPP_PORT
=
$VIZAPP_PORT
\
singularity run
-f
-C
-w
-e
\
singularity run
-f
-C
-w
-e
\
-H
$tmpDir
/home:/root
\
-H
$tmpDir
/home:/root
\
-B
$outputDir
:/mnt,
$VIZAPP_HOME
:/vizapp,
$tmpDir
/tmp:/tmp
${
singularity_image
}
-B
$outputDir
:/mnt,
$VIZAPP_HOME
:/vizapp,
$tmpDir
/tmp:/tmp
${
singularity_image
}
## Enable this section if run as non-root user inside the container
## Enable this section if run as non-root user inside the container
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment