Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rosetta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ExaCT
Rosetta
Commits
8d763b65
Commit
8d763b65
authored
4 years ago
by
Stefano Alberto Russo
Browse files
Options
Downloads
Patches
Plain Diff
Moved from mounting /home/metauser as sandbox to the entire /home directory.
parent
6a6cb795
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
services/webapp/code/rosetta/core_app/computing_managers.py
+4
-4
4 additions, 4 deletions
services/webapp/code/rosetta/core_app/computing_managers.py
with
4 additions
and
4 deletions
services/webapp/code/rosetta/core_app/computing_managers.py
+
4
−
4
View file @
8d763b65
...
...
@@ -209,7 +209,7 @@ class RemoteComputingManager(ComputingManager):
run_command
+=
'
/bin/bash -c
\'
"
rm -rf /tmp/{}_data && mkdir -p /tmp/{}_data/tmp && mkdir -p /tmp/{}_data/home && chmod 700 /tmp/{}_data &&
'
.
format
(
task
.
uuid
,
task
.
uuid
,
task
.
uuid
,
task
.
uuid
)
run_command
+=
'
wget {}/api/v1/base/agent/?task_uuid={} -O /tmp/{}_data/agent.py &> /dev/null && export BASE_PORT=\$(python /tmp/{}_data/agent.py 2> /tmp/{}_data/task.log) &&
'
.
format
(
webapp_conn_string
,
task
.
uuid
,
task
.
uuid
,
task
.
uuid
,
task
.
uuid
)
run_command
+=
'
export SINGULARITY_NOHTTPS=true && export SINGULARITYENV_BASE_PORT=\$BASE_PORT && {}
'
.
format
(
authstring
)
run_command
+=
'
exec nohup singularity run {} --pid --writable-tmpfs --no-home --home=/home/metauser --workdir /tmp/{}_data/tmp -B/tmp/{}_data/home:/home
/metauser
--containall --cleanenv
'
.
format
(
binds
,
task
.
uuid
,
task
.
uuid
)
run_command
+=
'
exec nohup singularity run {} --pid --writable-tmpfs --no-home --home=/home/metauser --workdir /tmp/{}_data/tmp -B/tmp/{}_data/home:/home --containall --cleanenv
'
.
format
(
binds
,
task
.
uuid
,
task
.
uuid
)
# Set registry
if
task
.
container
.
registry
==
'
docker_local
'
:
...
...
@@ -367,7 +367,7 @@ class SlurmComputingManager(ComputingManager):
run_command
+=
'
\'
bash -c
"
echo
\\
"
#!/bin/bash
\n
wget {}/api/v1/base/agent/?task_uuid={} -O \$HOME/agent_{}.py &> \$HOME/{}.log && export BASE_PORT=
\\\\\\
$(python \$HOME/agent_{}.py 2> \$HOME/{}.log) &&
'
.
format
(
webapp_conn_string
,
task
.
uuid
,
task
.
uuid
,
task
.
uuid
,
task
.
uuid
,
task
.
uuid
)
run_command
+=
'
export SINGULARITY_NOHTTPS=true && export SINGULARITYENV_BASE_PORT=
\\\\\\
$BASE_PORT && {}
'
.
format
(
authstring
)
run_command
+=
'
rm -rf /tmp/{}_data && mkdir -p /tmp/{}_data/tmp &>> \$HOME/{}.log && mkdir -p /tmp/{}_data/home &>> \$HOME/{}.log && chmod 700 /tmp/{}_data &&
'
.
format
(
task
.
uuid
,
task
.
uuid
,
task
.
uuid
,
task
.
uuid
,
task
.
uuid
,
task
.
uuid
)
run_command
+=
'
exec nohup singularity run {} --pid --writable-tmpfs --no-home --home=/home/metauser --workdir /tmp/{}_data/tmp -B/tmp/{}_data/home:/home
/metauser
--containall --cleanenv
'
.
format
(
binds
,
task
.
uuid
,
task
.
uuid
)
run_command
+=
'
exec nohup singularity run {} --pid --writable-tmpfs --no-home --home=/home/metauser --workdir /tmp/{}_data/tmp -B/tmp/{}_data/home:/home --containall --cleanenv
'
.
format
(
binds
,
task
.
uuid
,
task
.
uuid
)
# Double to escape for Pythom, six for shell (double times three as \\\ escapes a single slash in shell)
...
...
@@ -526,14 +526,14 @@ class RemotehopComputingManager(ComputingManager):
run_command
+=
setup_command
+
'
&&
'
run_command
+=
'
\'
export SINGULARITY_NOHTTPS=true && export SINGULARITYENV_BASE_PORT=\$BASE_PORT && {}
'
.
format
(
authstring
)
run_command
+=
'
rm -rf /tmp/{}_data && mkdir -p /tmp/{}_data/tmp &>> \$HOME/{}.log && mkdir -p /tmp/{}_data/home &>> \$HOME/{}.log && chmod 700 /tmp/{}_data &&
'
.
format
(
task
.
uuid
,
task
.
uuid
,
task
.
uuid
,
task
.
uuid
,
task
.
uuid
,
task
.
uuid
)
run_command
+=
'
exec nohup singularity run {} --pid --writable-tmpfs --no-home --home=/home/metauser --workdir /tmp/{}_data/tmp -B/tmp/{}_data/home:/home
/metauser
--containall --cleanenv
'
.
format
(
binds
,
task
.
uuid
,
task
.
uuid
)
run_command
+=
'
exec nohup singularity run {} --pid --writable-tmpfs --no-home --home=/home/metauser --workdir /tmp/{}_data/tmp -B/tmp/{}_data/home:/home --containall --cleanenv
'
.
format
(
binds
,
task
.
uuid
,
task
.
uuid
)
else
:
run_command
+=
'
: &&
'
# Trick to prevent some issues in exporting variables
if
setup_command
:
run_command
+=
setup_command
+
'
&&
'
run_command
+=
'
export SINGULARITY_NOHTTPS=true && export SINGULARITYENV_BASE_PORT={} && {}
'
.
format
(
task
.
port
,
authstring
)
run_command
+=
'
rm -rf /tmp/{}_data && mkdir -p /tmp/{}_data/tmp &>> \$HOME/{}.log && mkdir -p /tmp/{}_data/home &>> \$HOME/{}.log && chmod 700 /tmp/{}_data &&
'
.
format
(
task
.
uuid
,
task
.
uuid
,
task
.
uuid
,
task
.
uuid
,
task
.
uuid
,
task
.
uuid
)
run_command
+=
'
exec nohup singularity run {} --pid --writable-tmpfs --no-home --home=/home/metauser --workdir /tmp/{}_data/tmp -B/tmp/{}_data/home:/home
/metauser
--containall --cleanenv
'
.
format
(
binds
,
task
.
uuid
,
task
.
uuid
)
run_command
+=
'
exec nohup singularity run {} --pid --writable-tmpfs --no-home --home=/home/metauser --workdir /tmp/{}_data/tmp -B/tmp/{}_data/home:/home --containall --cleanenv
'
.
format
(
binds
,
task
.
uuid
,
task
.
uuid
)
# Set registry
if
task
.
container
.
registry
==
'
docker_local
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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