Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.devtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
bob
bob.devtools
Commits
7521d439
Commit
7521d439
authored
2 years ago
by
Laurent COLBOIS
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup duplicate
parent
206124a8
No related branches found
No related tags found
1 merge request
!298
Add script to install CI versions of all external Bob dependencies
Pipeline
#62482
passed
2 years ago
Stage: qa
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/devtools/scripts/install_deps.py
+0
-52
0 additions, 52 deletions
bob/devtools/scripts/install_deps.py
with
0 additions
and
52 deletions
bob/devtools/scripts/install_deps.py
deleted
100644 → 0
+
0
−
52
View file @
206124a8
"""
Create an environment with all external dependencies listed in bob/devtools/data/conda_build_config.yaml
"""
import
click
@click.command
(
epilog
=
"""
Example:
1. Creates an environment called `myenv
'
containing all external bob dependencies:
python bob/devtools/scripts/install_deps.py myenv
2. The version of python to solve with can be provided as option:
python bob/devtools/scripts/install_deps.py myenv --python=3.8
"""
)
@click.argument
(
"
env_name
"
,
nargs
=
1
)
@click.option
(
"
--python
"
,
required
=
True
,
help
=
"
Python version to pin, e.g. 3.8
"
)
def
install_deps
(
env_name
,
python
):
import
subprocess
from
bob.devtools.build
import
load_packages_from_conda_build_config
conda_config_path
=
"
bob/devtools/data/conda_build_config.yaml
"
packages
,
package_names_map
=
load_packages_from_conda_build_config
(
conda_config_path
,
{
"
channels
"
:
[]},
with_pins
=
True
)
# ask mamba to create an environment with the packages
try
:
_
=
subprocess
.
run
(
[
"
mamba
"
,
"
create
"
,
"
--override-channels
"
,
"
-c
"
,
"
conda-forge
"
,
"
-n
"
,
env_name
,
f
"
python=
{
python
}
"
,
]
+
packages
,
check
=
True
,
)
except
subprocess
.
CalledProcessError
as
e
:
print
(
e
.
output
.
decode
())
raise
e
if
__name__
==
"
__main__
"
:
install_deps
()
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