New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhance Conda
easyblock: add support for specifying list of conda packages and Python version to install + using mambaBetter conda support
#2992
base: develop
Are you sure you want to change the base?
Conversation
@@ -88,12 +127,24 @@ def install_step(self): | |||
cmd = "%s conda create --force -y -p %s %s" % (self.cfg['preinstallopts'], self.installdir, install_args) | |||
run_cmd(cmd, log_all=True, simple=True) | |||
|
|||
|
|||
def det_python_version(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many blank lines (2)
self.log.info("Installed conda requirements") | ||
|
||
run_cmd("%s install -p %s --no-deps %s" % (conda_cmd,self.installdir,install_args) ,log_all=True,simple=True) | ||
run_cmd("ln -sf $(which python) %s" % (os.path.join(self.installdir,"bin","python"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after ','
|
||
self.log.info("Installed conda requirements") | ||
|
||
run_cmd("%s install -p %s --no-deps %s" % (conda_cmd,self.installdir,install_args) ,log_all=True,simple=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (121 > 120 characters)
missing whitespace after ','
whitespace before ','
run_cmd(cmd, log_all=True, simple=True) | ||
|
||
install_args = "" | ||
if isinstance(self.src,list): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after ','
|
||
python_version = self.cfg['python_version'] or f"python{self.det_python_version()}" | ||
|
||
cmd = "%s %s create --force -y -p %s python=%s --no-default-packages --no-deps" % (self.cfg['preinstallopts'], conda_cmd, self.installdir,python_version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (165 > 120 characters)
missing whitespace after ','
'source_urls': [base_url + 'noarch',base_url + 'linux-64'] | ||
}) | ||
|
||
self.cfg.update('sources',sources) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after ','
base_url = f"https://conda.anaconda.org/{package['channel']}/" | ||
sources.append({ | ||
'filename': package['fn'], | ||
'source_urls': [base_url + 'noarch',base_url + 'linux-64'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after ','
|
||
sources = [] | ||
for package in self.cfg['conda_packages']: | ||
base_url = f"https://conda.anaconda.org/{package['channel']}/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple spaces after operator
@@ -39,6 +39,22 @@ | |||
class Conda(Binary): | |||
"""Support for installing software using 'conda'.""" | |||
|
|||
def __init__(self,*args,**kwargs): | |||
super(Conda,self).__init__(*args,**kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after ','
@@ -39,6 +39,22 @@ | |||
class Conda(Binary): | |||
"""Support for installing software using 'conda'.""" | |||
|
|||
def __init__(self,*args,**kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after ','
I think we may need some additional changes in the final module file for a conda package. We should consider:
|
I'll look into cleaning this up, and making sure the changes are backwards compatible. @xerbalind was working in the HPC-UGent team as summer intern in Aug'23, and opened this WIP PR on my request to ensure his efforts were not lost. |
@boegel There are some straightforward improvements to the conda easyblock in #2996 (which also covers the |
Conda
easyblock: add support for specifying list of conda packages and Python version to install + using mambaBetter conda support
No description provided.