Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eic_container
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
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
containers
eic_container
Commits
6ddc2201
Commit
6ddc2201
authored
2 years ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
chore: epic@22.11.1; remove ip6 from nightly
parent
c8e5df5e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!390
chore: epic@22.11.1; remove ip6 from nightly
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
containers/jug/setup_detectors.py
+37
-9
37 additions, 9 deletions
containers/jug/setup_detectors.py
detectors.yaml
+5
-3
5 additions, 3 deletions
detectors.yaml
with
42 additions
and
12 deletions
containers/jug/setup_detectors.py
+
37
−
9
View file @
6ddc2201
...
@@ -5,7 +5,7 @@ import yaml
...
@@ -5,7 +5,7 @@ import yaml
import
argparse
import
argparse
DETECTOR_REPO_GROUP
=
'
https://github.com/eic
'
DETECTOR_REPO_GROUP
=
'
https://github.com/eic
'
DETECTOR_ENV
=
'''
DETECTOR_
BEAMLINE_
ENV
=
'''
#!/bin/sh
#!/bin/sh
export DETECTOR={detector}
export DETECTOR={detector}
export DETECTOR_PATH={data_prefix}
export DETECTOR_PATH={data_prefix}
...
@@ -32,6 +32,22 @@ export PS1="{branch}${{PS1_SIGIL}}>${{PS1#*>}}"
...
@@ -32,6 +32,22 @@ export PS1="{branch}${{PS1_SIGIL}}>${{PS1#*>}}"
unset branch
unset branch
'''
'''
DETECTOR_ENV
=
'''
#!/bin/sh
export DETECTOR={detector}
export DETECTOR_PATH={data_prefix}
export DETECTOR_CONFIG={detector}
export DETECTOR_VERSION={version}
## Export detector libraries
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{prefix}/lib
## modify PS1 for this detector version
export PS1=
"
${{PS1:-}}
"
export PS1=
"
{branch}${{PS1_SIGIL}}>${{PS1#*>}}
"
unset branch
'''
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
parser
.
add_argument
(
...
@@ -86,14 +102,17 @@ if __name__ == '__main__':
...
@@ -86,14 +102,17 @@ if __name__ == '__main__':
del
detectors
[
det
][
'
nightly
'
]
del
detectors
[
det
][
'
nightly
'
]
for
branch
in
detectors
[
det
]:
for
branch
in
detectors
[
det
]:
cfg
=
detectors
[
det
][
branch
]
cfg
=
detectors
[
det
][
branch
]
ip
=
cfg
[
'
ip
'
]
version
=
cfg
[
'
version
'
]
if
branch
!=
'
nightly
'
else
'
nightly
'
version
=
cfg
[
'
version
'
]
if
branch
!=
'
nightly
'
else
'
nightly
'
print
(
'
- {}-{} and {}-{}
'
.
format
(
det
,
cfg
[
'
version
'
],
ip
[
'
config
'
],
ip
[
'
version
'
]))
prefix
=
'
{}/{}-{}
'
.
format
(
args
.
prefix
,
det
,
version
)
prefix
=
'
{}/{}-{}
'
.
format
(
args
.
prefix
,
det
,
version
)
data_dir
=
'
{}/share/{}
'
.
format
(
prefix
,
det
)
data_dir
=
'
{}/share/{}
'
.
format
(
prefix
,
det
)
## build and install detector and IP code
## build list of projects to install
for
(
proj
,
vers
)
in
[(
det
,
cfg
[
'
version
'
]),
(
ip
[
'
config
'
],
ip
[
'
version
'
])]:
proj_vers_list
=
[(
det
,
cfg
[
'
version
'
])]
if
'
ip
'
in
cfg
:
ip
=
cfg
[
'
ip
'
]
proj_vers_list
.
append
((
ip
[
'
config
'
],
ip
[
'
version
'
]))
## build and install projects
for
(
proj
,
vers
)
in
proj_vers_list
:
print
(
'
- {}-{}
'
.
format
(
proj
,
vers
))
## clone/build/install detector libraries
## clone/build/install detector libraries
cmd
=
[
'
rm -rf /tmp/build /tmp/det
'
,
cmd
=
[
'
rm -rf /tmp/build /tmp/det
'
,
'
&&
'
,
'
&&
'
,
...
@@ -122,7 +141,7 @@ if __name__ == '__main__':
...
@@ -122,7 +141,7 @@ if __name__ == '__main__':
print
(
'
'
.
join
(
cmd
))
print
(
'
'
.
join
(
cmd
))
os
.
system
(
'
'
.
join
(
cmd
))
os
.
system
(
'
'
.
join
(
cmd
))
## also copy over IP configuration to the detector
## also copy over IP configuration to the detector
if
os
.
path
.
exists
(
'
/tmp/det/{ip}
'
.
format
(
ip
=
ip
[
'
config
'
])):
if
'
ip
'
in
cfg
and
os
.
path
.
exists
(
'
/tmp/det/{ip}
'
.
format
(
ip
=
cfg
[
'
ip
'
]
[
'
config
'
])):
cmd
=
'
cp -r /tmp/det/{ip} {data_dir}
'
.
format
(
cmd
=
'
cp -r /tmp/det/{ip} {data_dir}
'
.
format
(
ip
=
ip
[
'
config
'
],
data_dir
=
data_dir
)
ip
=
ip
[
'
config
'
],
data_dir
=
data_dir
)
print
(
cmd
)
print
(
cmd
)
...
@@ -142,7 +161,8 @@ if __name__ == '__main__':
...
@@ -142,7 +161,8 @@ if __name__ == '__main__':
os
.
system
(
cmd
)
os
.
system
(
cmd
)
## write an environment file for this detector
## write an environment file for this detector
with
open
(
'
{prefix}/setup.sh
'
.
format
(
prefix
=
prefix
),
'
w
'
)
as
f
:
with
open
(
'
{prefix}/setup.sh
'
.
format
(
prefix
=
prefix
),
'
w
'
)
as
f
:
print
(
DETECTOR_ENV
.
format
(
if
'
ip
'
in
cfg
:
print
(
DETECTOR_BEAMLINE_ENV
.
format
(
prefix
=
prefix
,
prefix
=
prefix
,
detector
=
det
,
detector
=
det
,
data_prefix
=
data_dir
,
data_prefix
=
data_dir
,
...
@@ -150,7 +170,15 @@ if __name__ == '__main__':
...
@@ -150,7 +170,15 @@ if __name__ == '__main__':
ip
=
ip
[
'
config
'
],
ip
=
ip
[
'
config
'
],
ip_version
=
ip
[
'
version
'
],
ip_version
=
ip
[
'
version
'
],
branch
=
branch
),
branch
=
branch
),
file
=
f
)
file
=
f
)
else
:
print
(
DETECTOR_ENV
.
format
(
prefix
=
prefix
,
detector
=
det
,
data_prefix
=
data_dir
,
version
=
cfg
[
'
version
'
],
branch
=
branch
),
file
=
f
)
## run once inside global prefix to initialize artifacts in /opt/detectors
## run once inside global prefix to initialize artifacts in /opt/detectors
os
.
environ
[
'
DETECTOR_PATH
'
]
=
args
.
prefix
os
.
environ
[
'
DETECTOR_PATH
'
]
=
args
.
prefix
cmd
=
f
'
bash -c
\'
cd
{
args
.
prefix
}
&& source
{
prefix
}
/setup.sh && checkGeometry -c
{
prefix
}
/share/
{
det
}
/
{
det
}
.xml
\'
'
cmd
=
f
'
bash -c
\'
cd
{
args
.
prefix
}
&& source
{
prefix
}
/setup.sh && checkGeometry -c
{
prefix
}
/share/
{
det
}
/
{
det
}
.xml
\'
'
...
...
This diff is collapsed.
Click to expand it.
detectors.yaml
+
5
−
3
View file @
6ddc2201
...
@@ -3,9 +3,6 @@ detectors:
...
@@ -3,9 +3,6 @@ detectors:
nightly
:
nightly
:
default
:
true
default
:
true
version
:
main
version
:
main
ip
:
config
:
ip6
version
:
master
22.10.0
:
22.10.0
:
version
:
22.10.0
version
:
22.10.0
ip
:
ip
:
...
@@ -16,6 +13,11 @@ detectors:
...
@@ -16,6 +13,11 @@ detectors:
ip
:
ip
:
config
:
ip6
config
:
ip6
version
:
22.11.0
version
:
22.11.0
22.11.1
:
version
:
22.11.1
ip
:
config
:
ip6
version
:
22.11.0
athena
:
athena
:
nightly
:
nightly
:
version
:
master
version
:
master
...
...
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