Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.web
Commits
f27f4b3a
Commit
f27f4b3a
authored
Jun 09, 2020
by
André Anjos
💬
Browse files
Merge branch 'update_execution_environment' into 'master'
Update execution environment See merge request
!333
parents
fe74ed3d
01e60f53
Pipeline
#40415
passed with stages
in 16 minutes and 22 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
beat/web/backend/management/commands/qsetup.py
View file @
f27f4b3a
...
...
@@ -41,9 +41,9 @@ logger = logging.getLogger("beat.web")
CORES
=
psutil
.
cpu_count
()
RAM
=
int
(
psutil
.
virtual_memory
().
total
/
(
1024
*
1024
))
ENVIRONMENT
=
{
"name"
:
"Python
2.7
"
,
"version"
:
"1.3.0"
}
CXX_ENVIRONMENT
=
{
"name"
:
"C
xx backend
"
,
"version"
:
"
1.1
.0"
}
GPU_ENVIRONMENT
=
{
"name"
:
"
Pytorch 0.4.0
"
,
"version"
:
"0.0
.1
"
}
ENVIRONMENT
=
{
"name"
:
"Python
for tests
"
,
"version"
:
"1.3.0"
}
CXX_ENVIRONMENT
=
{
"name"
:
"C
++
"
,
"version"
:
"
2.0
.0"
}
GPU_ENVIRONMENT
=
{
"name"
:
"
Deep Learning
"
,
"version"
:
"
1.
0.0"
}
ENVKEY
=
"%(name)s (%(version)s)"
%
ENVIRONMENT
CXX_ENVKEY
=
"%(name)s (%(version)s)"
%
CXX_ENVIRONMENT
GPU_ENVKEY
=
"%(name)s (%(version)s)"
%
GPU_ENVIRONMENT
...
...
beat/web/backend/tests/common.py
View file @
f27f4b3a
...
...
@@ -59,7 +59,7 @@ ONE_QUEUE_TWO_WORKERS = {
"time-limit"
:
1440
,
# 1 day
"cores-per-slot"
:
1
,
"max-slots-per-user"
:
2
,
"environments"
:
[
"Python
2.7
(1.3.0)"
],
"environments"
:
[
"Python
for tests
(1.3.0)"
],
"slots"
:
{
"node1"
:
{
"quantity"
:
1
,
"priority"
:
0
},
"node2"
:
{
"quantity"
:
1
,
"priority"
:
0
},
...
...
@@ -72,8 +72,8 @@ ONE_QUEUE_TWO_WORKERS = {
"node2"
:
{
"cores"
:
1
,
"memory"
:
16
*
1024
},
},
"environments"
:
{
"Python
2.7
(1.3.0)"
:
{
"name"
:
"Python
2.7
"
,
"Python
for tests
(1.3.0)"
:
{
"name"
:
"Python
for tests
"
,
"version"
:
"1.3.0"
,
"short_description"
:
"Test"
,
"description"
:
"Test environment"
,
...
...
@@ -96,7 +96,7 @@ class BackendUtilitiesMixin(object):
setup_backend
(
qsetup
.
DEFAULT_CONFIGURATION
)
Worker
.
objects
.
update
(
active
=
True
)
env
=
Environment
.
objects
.
get
(
name
=
"Python
2.7
"
)
env
=
Environment
.
objects
.
get
(
name
=
"Python
for tests
"
)
queue
=
Queue
.
objects
.
first
()
template_data
=
dict
(
...
...
@@ -222,7 +222,7 @@ class BaseBackendTestCase(TestCase, BackendUtilitiesMixin):
self
.
assertEqual
(
b0
.
dependencies
.
count
(),
0
)
self
.
assertEqual
(
b0
.
dependents
.
count
(),
1
)
self
.
assertEqual
(
b0
.
queue
.
name
,
"queue"
)
self
.
assertEqual
(
b0
.
environment
.
name
,
"Python
2.7
"
)
self
.
assertEqual
(
b0
.
environment
.
name
,
"Python
for tests
"
)
self
.
assertEqual
(
b0
.
required_slots
,
1
)
self
.
assertEqual
(
b0
.
inputs
.
count
(),
1
)
self
.
assertEqual
(
b0
.
outputs
.
count
(),
1
)
...
...
@@ -240,7 +240,7 @@ class BaseBackendTestCase(TestCase, BackendUtilitiesMixin):
self
.
assertEqual
(
b1
.
dependencies
.
count
(),
1
)
self
.
assertEqual
(
b1
.
dependents
.
count
(),
0
)
self
.
assertEqual
(
b1
.
queue
.
name
,
"queue"
)
self
.
assertEqual
(
b1
.
environment
.
name
,
"Python
2.7
"
)
self
.
assertEqual
(
b1
.
environment
.
name
,
"Python
for tests
"
)
self
.
assertEqual
(
b1
.
required_slots
,
1
)
self
.
assertEqual
(
b1
.
inputs
.
count
(),
1
)
self
.
assertEqual
(
b1
.
outputs
.
count
(),
1
)
...
...
beat/web/backend/tests/test_setup.py
View file @
f27f4b3a
...
...
@@ -54,7 +54,7 @@ QUEUES_WITHOUT_PRIORITY = {
"time-limit"
:
180
,
# 3 hours
"cores-per-slot"
:
1
,
"max-slots-per-user"
:
4
,
"environments"
:
[
"Python
2.7
(1.3.0)"
],
"environments"
:
[
"Python
for tests
(1.3.0)"
],
"groups"
:
[
"Default"
],
"slots"
:
{
"node1"
:
{
"quantity"
:
4
,
"priority"
:
0
}},
},
...
...
@@ -66,7 +66,7 @@ QUEUES_WITHOUT_PRIORITY = {
"time-limit"
:
360
,
# 6 hours
"cores-per-slot"
:
2
,
"max-slots-per-user"
:
2
,
"environments"
:
[
"Python
2.7
(1.3.0)"
],
"environments"
:
[
"Python
for tests
(1.3.0)"
],
"groups"
:
[
"Default"
],
"slots"
:
{
"node1"
:
{
"quantity"
:
2
,
"priority"
:
0
}},
},
...
...
@@ -78,7 +78,7 @@ QUEUES_WITHOUT_PRIORITY = {
"time-limit"
:
720
,
# 12 hours
"cores-per-slot"
:
4
,
"max-slots-per-user"
:
1
,
"environments"
:
[
"Python
2.7
(1.3.0)"
],
"environments"
:
[
"Python
for tests
(1.3.0)"
],
"groups"
:
[
"Default"
],
"slots"
:
{
"node1"
:
{
"quantity"
:
1
,
"priority"
:
0
}},
},
...
...
@@ -87,8 +87,8 @@ QUEUES_WITHOUT_PRIORITY = {
),
"workers"
:
{
"node1"
:
{
"cores"
:
4
,
"memory"
:
16
*
1024
}},
"environments"
:
{
"Python
2.7
(1.3.0)"
:
{
"name"
:
"Python
2.7
"
,
"Python
for tests
(1.3.0)"
:
{
"name"
:
"Python
for tests
"
,
"version"
:
"1.3.0"
,
"short_description"
:
"Test"
,
"description"
:
"Test environment"
,
...
...
@@ -108,7 +108,7 @@ PRIORITY_QUEUES = {
"time-limit"
:
180
,
# 3 hours
"cores-per-slot"
:
1
,
"max-slots-per-user"
:
2
,
"environments"
:
[
"Python
2.7
(1.3.0)"
],
"environments"
:
[
"Python
for tests
(1.3.0)"
],
"groups"
:
[
"Default"
],
"slots"
:
{
"node1"
:
{
"quantity"
:
4
,
"priority"
:
5
},
...
...
@@ -123,7 +123,7 @@ PRIORITY_QUEUES = {
"time-limit"
:
360
,
# 6 hours
"cores-per-slot"
:
2
,
"max-slots-per-user"
:
1
,
"environments"
:
[
"Python
2.7
(1.3.0)"
],
"environments"
:
[
"Python
for tests
(1.3.0)"
],
"groups"
:
[
"Default"
],
"slots"
:
{
"node1"
:
{
"quantity"
:
2
,
"priority"
:
0
},
...
...
@@ -138,7 +138,7 @@ PRIORITY_QUEUES = {
"time-limit"
:
180
,
# 3 hours
"cores-per-slot"
:
1
,
"max-slots-per-user"
:
8
,
"environments"
:
[
"Python
2.7
(1.3.0)"
],
"environments"
:
[
"Python
for tests
(1.3.0)"
],
"groups"
:
[
"Default"
],
"slots"
:
{
"node1"
:
{
"quantity"
:
4
,
"priority"
:
0
},
...
...
@@ -155,8 +155,8 @@ PRIORITY_QUEUES = {
]
),
"environments"
:
{
"Python
2.7
(1.3.0)"
:
{
"name"
:
"Python
2.7
"
,
"Python
for tests
(1.3.0)"
:
{
"name"
:
"Python
for tests
"
,
"version"
:
"1.3.0"
,
"short_description"
:
"Test"
,
"description"
:
"Test environment"
,
...
...
@@ -270,7 +270,7 @@ class BackendSetup(BaseBackendTestCase):
env
=
q1
.
environments
.
first
()
self
.
assertEqual
(
env
.
name
,
"Python
2.7
"
)
self
.
assertEqual
(
env
.
name
,
"Python
for tests
"
)
self
.
assertEqual
(
env
.
version
,
"1.3.0"
)
self
.
assertEqual
(
q1
.
slots
.
count
(),
1
)
...
...
@@ -377,7 +377,7 @@ class BackendSetup(BaseBackendTestCase):
env
=
q1
.
environments
.
first
()
self
.
assertEqual
(
env
.
name
,
"Python
2.7
"
)
self
.
assertEqual
(
env
.
name
,
"Python
for tests
"
)
self
.
assertEqual
(
env
.
version
,
"1.3.0"
)
self
.
assertEqual
(
q1
.
slots
.
count
(),
2
)
...
...
dev.yml
View file @
f27f4b3a
...
...
@@ -11,9 +11,9 @@ dependencies:
-
beat-devel=2020.01.09
# beat dependencies matching release.cfg
-
beat.core=1.10.
3
-
beat.backend.python=1.7.
7
-
beat.cmdline=1.7.
1
-
beat.core=1.10.
4
-
beat.backend.python=1.7.
8
-
beat.cmdline=1.7.
4
# requirements.txt, they are indirectly pinned through the above
-
docopt
...
...
release.cfg
View file @
f27f4b3a
...
...
@@ -25,9 +25,9 @@ eggs = ${buildout:eggs}
interpreter = python
[sources]
beat.core = git https://gitlab.idiap.ch/beat/beat.core.git rev=v1.10.
3
beat.cmdline = git https://gitlab.idiap.ch/beat/beat.cmdline.git rev=v1.7.
1
beat.backend.python = git https://gitlab.idiap.ch/beat/beat.backend.python.git rev=v1.7.
7
beat.core = git https://gitlab.idiap.ch/beat/beat.core.git rev=v1.10.
4
beat.cmdline = git https://gitlab.idiap.ch/beat/beat.cmdline.git rev=v1.7.
4
beat.backend.python = git https://gitlab.idiap.ch/beat/beat.backend.python.git rev=v1.7.
8
[uwsgi]
recipe = buildout.recipe.uwsgi
...
...
Write
Preview
Markdown
is supported
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