Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
HTConfig
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
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
EKPCondor
HTConfig
Commits
86535ccd
Commit
86535ccd
authored
10 months ago
by
Sebastian Brommer
Browse files
Options
Downloads
Patches
Plain Diff
update prepare script
parent
35b5ab28
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/config_sites.json
+0
-1
0 additions, 1 deletion
scripts/config_sites.json
scripts/prepare_singularity.py
+15
-1
15 additions, 1 deletion
scripts/prepare_singularity.py
with
15 additions
and
2 deletions
scripts/config_sites.json
+
0
−
1
View file @
86535ccd
...
...
@@ -13,7 +13,6 @@
"0083.partitionable_slots.cfg"
,
"0085.auto_shutdown.cfg"
,
"0088.ssh_to_job.cfg"
,
"0110.node_worker_docker.cfg"
,
"0212.node_worker_bwforcluster_container.cfg"
],
"scripts"
:
[
...
...
This diff is collapsed.
Click to expand it.
scripts/prepare_singularity.py
+
15
−
1
View file @
86535ccd
...
...
@@ -55,6 +55,7 @@ def check_image_availability(image_path):
def
main
():
job_ad
=
get_job_ad
()
status_message
=
""
# write job_ad to a json file for debugging
dumpfilepath
=
"
/scratch/job_ad.json
"
with
open
(
dumpfilepath
,
"
w
"
)
as
f
:
...
...
@@ -63,10 +64,17 @@ def main():
docker_image
=
job_ad
.
get
(
"
DockerImage
"
)
if
not
container_image
and
not
docker_image
:
status_message
=
"
No container image provided, using default container: /cvmfs/unpacked.cern.ch/registry.hub.docker.com/mschnepf/slc7-condocker:latest
"
print
(
"
ContainerImage = /cvmfs/unpacked.cern.ch/registry.hub.docker.com/mschnepf/slc7-condocker:latest
"
)
print
(
"
WantDocker = false
"
)
job_ad
[
"
ContainerImage
"
]
=
(
"
/cvmfs/unpacked.cern.ch/registry.hub.docker.com/mschnepf/slc7-condocker:latest
"
)
job_ad
[
"
WantDocker
"
]
=
"
false
"
with
open
(
dumpfilepath
,
"
w
"
)
as
f
:
json
.
dump
(
job_ad
,
f
,
indent
=
4
)
return
# pick the args parameter that is not None
image
=
container_image
or
docker_image
...
...
@@ -79,7 +87,13 @@ def main():
condor_arg
=
f
"
docker://
{
domain
}
/
{
imagename
}
"
print
(
f
"
ContainerImage =
{
condor_arg
}
"
)
print
(
"
WantDocker = false
"
)
# write the image path to a .cfg file to be used by condor
# dump the updated job ad to a file for debugging
job_ad
[
"
ContainerImage
"
]
=
condor_arg
job_ad
[
"
WantDocker
"
]
=
"
false
"
with
open
(
dumpfilepath
,
"
w
"
)
as
f
:
json
.
dump
(
job_ad
,
f
,
indent
=
4
)
status_message
=
f
"
Container image
{
image_path
}
is available, using it
"
print
(
f
"
HookStatusMessage =
{
status_message
}
"
)
if
__name__
==
"
__main__
"
:
...
...
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