Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.admin
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.admin
Commits
dc0d4796
Commit
dc0d4796
authored
6 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Mitigate lack of pyyaml on the running environment; Instruct to activate base before running this
parent
06bfc894
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
conda/conda-bootstrap.py
+15
-11
15 additions, 11 deletions
conda/conda-bootstrap.py
with
15 additions
and
11 deletions
conda/conda-bootstrap.py
+
15
−
11
View file @
dc0d4796
...
...
@@ -24,10 +24,11 @@ environment.
examples:
1. Creates an environment called `myenv
'
for developing the currently
checked-out package:
checked-out package
(N.B.: first activate the base environment)
:
$ cd bob.package.foo
$ %(prog)s myenv
$ conda activate base
(base) $ %(prog)s myenv
The above command assumes the directory `conda
'
exists on the current
directory and that it contains a file called `meta.yaml
'
containing the
...
...
@@ -40,20 +41,23 @@ examples:
the default python version to use for the newly created environment. You
may select a different one with `--python=X.Y
'
:
$ %(prog)s --python=3.6 myenv
$ conda activate base
(base) $ %(prog)s --python=3.6 myenv
3. By default, we use bob.admin
'
s condarc and `conda_build_config.yaml` files
that are used in creating packages for our CI/CD system. If you wish to
use your own, specify them on the command line:
$ %(prog)s --config=config.yaml --condarc=~/.condarc myenv
$ conda activate base
(base) $ %(prog)s --config=config.yaml --condarc=~/.condarc myenv
Notice the condarc file **must** end in `condarc
'
, or conda will complain.
4. You may also specify the location of your conda installation, if it is not
available on $PATH:
$ %(prog)s --conda=/path/to/conda myenv
$ conda activate base
(base) $ %(prog)s --conda=/path/to/conda myenv
"""
...
...
@@ -68,12 +72,6 @@ import tempfile
import
argparse
import
subprocess
try
:
import
yaml
except
ImportError
:
print
(
'
The package pyyaml must be installed alongside python
'
)
sys
.
exit
(
1
)
def
which
(
env
,
program
):
...
...
@@ -95,6 +93,12 @@ def which(env, program):
def
get_rendered_recipe
(
args
):
try
:
import
yaml
except
ImportError
:
print
(
'
The package pyyaml must be installed alongside python
'
)
sys
.
exit
(
1
)
cmd
=
[
args
.
conda
,
'
render
'
,
'
--variant-config-files
'
,
args
.
config
,
...
...
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