Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-remote-tools-hub
Commits
18d1c0e6
Commit
18d1c0e6
authored
Nov 17, 2021
by
Sandor Brockhauser
Browse files
Merge branch 'markus-link-pyarpes-with-north' into 'develop'
Pyarpes container final touches See merge request
!40
parents
40c722e4
ceaaac1d
Pipeline
#116152
passed with stages
in 1 minute and 6 seconds
Changes
5
Pipelines
5
Hide whitespace changes
Inline
Side-by-side
docker/pyarpes/01-chown-dir
deleted
100644 → 0
View file @
40c722e4
#!/usr/bin/with-contentenv bash
chown
-R
abc:abc /pyarpes
\ No newline at end of file
docker/pyarpes/02-exec-cmd
View file @
18d1c0e6
#!/usr/bin/with-contentenv bash
# Add the command to run an app on startup
echo
"/pyarpes/miniconda3/bin/conda run -n arpes jupyter lab
$CWD
"
>
/config/.config/openbox/autostart
\ No newline at end of file
echo
"/pyarpes/miniconda3/bin/conda run -n arpes jupyter lab
$RUNDIR
"
>
/config/.config/openbox/autostart
docker/pyarpes/Dockerfile
View file @
18d1c0e6
FROM
linuxserver/webtop:amd64-ubuntu-openbox-version-e1079163
RUN
apt update
\
&&
apt
install
git:amd64
=
1:2.25.1-1ubuntu3
-y
# Helps install miniconda in the directory we have ownership over
ENV
HOME=/pyarpes
# Install Miniconda
RUN
curl https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh
--output
miniconda-install.sh
\
&&
apt
install
git:amd64
=
1:2.25.1-1ubuntu3
-y
\
&&
export
HOME
=
/pyarpes
\
&&
curl https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh
--output
miniconda-install.sh
\
&&
chmod
+x miniconda-install.sh
\
&&
bash ./miniconda-install.sh
-b
# Needed to be set to run conda in the Dockerfile
ENV
PATH=/pyarpes/miniconda3/bin:$PATH
RUN
git clone https://github.com/Tommaso-Pincelli/arpes /pyarpes/arpes
WORKDIR
/pyarpes/arpes
RUN
git checkout 792a26dc0f335e2e310968d59750311b91209218
RUN
conda
env
create
-f
environment.yml
# Make RUN commands use the new environment:
SHELL
["conda", "run", "--no-capture-output", "-n", "arpes", "/bin/bash", "-c"]
RUN
pip
install
.
RUN
conda
install
-c
conda-forge jupyterlab
COPY
01-chown-dir /config/custom-cont-init.d/01-chown-dir
&&
bash ./miniconda-install.sh
-b
\
&&
chown
-R
1000:1000 /pyarpes/miniconda3/bin
\
&&
export
PATH
=
/pyarpes/miniconda3/bin:
$PATH
\
&&
git clone https://github.com/Tommaso-Pincelli/arpes /pyarpes/arpes
\
&&
cd
/pyarpes/arpes
\
&&
git checkout be27050716f9e306b99f6e6b416f82bfb071c8b4
\
&&
conda
env
create
-f
environment.yml
\
&&
conda run
--no-capture-output
-n
arpes pip
install
.
\
&&
conda run
--no-capture-output
-n
arpes conda
install
-c
conda-forge jupyterlab
\
&&
chown
-R
1000:1000 /pyarpes
ENV
PUID=1000 PGID=1000
COPY
02-exec-cmd /config/custom-cont-init.d/02-exec-cmd
COPY
pyARPES_download_and_visualize.ipynb /pyarpes/example/pyARPES_download_and_visualize.ipynb
WORKDIR
/pyarpes/example
\ No newline at end of file
north/app/models.py
View file @
18d1c0e6
...
...
@@ -59,6 +59,11 @@ all_tools: List[ToolModel] = [
description
=
'Run paraprobe on atom probe data'
,
docker_image
=
'TODO'
),
ToolModel
(
name
=
'pyarpes'
,
description
=
'Run pyARPES to analyze data'
,
docker_image
=
'TODO'
),
ToolModel
(
name
=
'pyarpes'
,
description
=
'Run pyARPES to analyze data'
,
...
...
north/app/routes/instances.py
View file @
18d1c0e6
...
...
@@ -58,7 +58,7 @@ def get_docker_client() -> DockerClient:
# Placeholder code for something that retains information of what container channel are available
# Todo: Add channel number tag to the docker container created and use that as a store
available_channel
=
deque
([
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
])
available_channel
=
deque
([
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
])
def
get_available_channel
()
->
str
:
...
...
@@ -161,7 +161,7 @@ async def post_instances(request: Request, instance: InstanceModel, token=Depend
ports
=
{
"3000"
:
int
(
f
'1000
{
channel
}
'
)},
detach
=
True
,
name
=
container_name
,
environment
=
{
"SUBFOLDER"
:
str
(
path
),
"PUID"
:
1000
,
"PGID"
:
1000
},
environment
=
{
"SUBFOLDER"
:
str
(
path
),
"PUID"
:
1000
,
"PGID"
:
1000
,
"RUNDIR"
:
"/home/jovyan/work/raw"
},
labels
=
{
"path"
:
path
,
"channel_token"
:
channel_token
},
mounts
=
get_docker_mounts_from_paths
(
instance
.
paths
)
)
...
...
Write
Preview
Supports
Markdown
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