Code Monkey home page Code Monkey logo

evandam.conda's People

Contributors

bbaassssiiee avatar emrobe avatar evandam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

evandam.conda's Issues

Setting channel order for a command

Exciting! I too was using UDST/ansible-conda for awhile but the project looks unmaintained. How would I go about setting either the default channel order, or adding channels for an install command? See other feature request here: UDST/ansible-conda#26

Flake8 code quality

  • library/conda.py:4:80: E501 line too long (92 > 79 characters)
  • library/conda.py:13:1: E302 expected 2 blank lines, found 1
  • library/conda.py:37:80: E501 line too long (92 > 79 characters)
  • library/conda.py:42:80: E501 line too long (99 > 79 characters)
  • library/conda.py:61:80: E501 line too long (81 > 79 characters)
  • library/conda.py:75:80: E501 line too long (83 > 79 characters)
  • library/conda.py:105:80: E501 line too long (85 > 79 characters)
  • library/conda.py:114:80: E501 line too long (94 > 79 characters)
  • library/conda.py:122:80: E501 line too long (86 > 79 characters)
  • library/conda.py:125:80: E501 line too long (85 > 79 characters)
  • library/conda.py:130:80: E501 line too long (87 > 79 characters)
  • library/conda.py:131:80: E501 line too long (82 > 79 characters)
  • library/conda.py:143:80: E501 line too long (84 > 79 characters)
  • library/conda.py:147:80: E501 line too long (83 > 79 characters)
  • library/conda.py:202:80: E501 line too long (83 > 79 characters)
  • library/conda.py:207:80: E501 line too long (88 > 79 characters)
  • library/conda.py:216:80: E501 line too long (90 > 79 characters)
  • library/conda.py:227:80: E501 line too long (88 > 79 characters)
  • library/conda.py:229:80: E501 line too long (90 > 79 characters)
  • library/conda.py:249:1: E302 expected 2 blank lines, found 1
  • library/conda.py:252:1: E305 expected 2 blank lines after class or function definition, found 1

Add a tag when merging PRs

Please push a tag to github when PRs are merged. For usage without surprises I'd like to specify a version, for example 1.0.2.

I use this command:
ansible-galaxy install -r requirements.yml -p roles

with this in the requirements.yml file:

---

- src: https://github.com/evandam/evandam.conda.git
  scm: git
  name: evandam.conda
  version: 1.0.2

With only master as the branch and no tags, I can obtain a change without notice.

conda not found in PATH, executable not specified

I get this error message when using the conda role without specifying executable. If I log in to the remote host, and echo $PATH, I see my conda directory in there -- but ansible doesn't find it. I guess this is because .bashrc is not executed in an ansible session; but then is it possible to use this module without specifying executable at all?

When I specify it, everything works fine (which, BTW, is great help, so thanks!).

Also, the parameter executable is not mentioned in the documentation.

[Errno 22] Invalid argument when configuring conda python3 environments

In my playbook for packer I try:

  tasks:
    - name: Create conda environments
      conda:
        executable: "{{ miniconda_dir }}/bin/conda"
        name: "python={{ item.python }}"
        environment: "{{ item.pyenv }}"
      with_items: "{{ miniconda_envs }}"

    - name: Configure conda environments
      conda:
        executable: "{{ miniconda_dir }}/bin/conda"
        environment: "{{ item.pyenv }}"
        channels: "{{ miniconda_channels }}"
        name: "{{ miniconda_packages }}"
        state: present
      with_items: "{{ miniconda_envs }}"

This fails with:

TASK [Configure conda environments] ********************************************
Monday 25 November 2019  15:50:45 -0500 (0:00:47.290)       0:14:10.788 *******
changed: [127.0.0.1] => (item={u'python': u'2.7', u'pyenv': u'/opt/conda/envs/py27_64'})
failed: [127.0.0.1] (item={u'python': u'3.6', u'pyenv': u'/opt/conda/envs/py36_64'}) => changed=false 
  cmd: /opt/conda/bin/conda list --json --prefix /opt/conda/envs/py36_64
  item:
    pyenv: /opt/conda/envs/py36_64
    python: '3.6'
  msg: '[Errno 22] Invalid argument'
  rc: 22
failed: [127.0.0.1] (item={u'python': u'3.7', u'pyenv': u'/opt/conda/envs/py37_64'}) => ged=false 
  cmd: /opt/conda/bin/conda list --json --prefix /opt/conda/envs/py37_64
  item:
    pyenv: /opt/conda/envs/py37_64
    python: '3.7'
  msg: '[Errno 22] Invalid argument'
  rc: 22

Support (or document) using a conda requirements file

Maybe this already works, maybe it doesn't, but if it does work it isn't documented.

Setting up my conda env looks like this:

conda env create -n my_conda_env -f path/to/requirements/conda.yml

I see no obvious way to specify that last parameter.

Unable to specify Conda Build attribute in package install

Hi evandam,

Love your work, we are looking to have a way to specify the Build attribute in Conda installs

For example /usr/app/anaconda_root/bin/conda install --json jupyterhub=1.0.0=py37_0 the =py37_0 is the part we are looking for added functionality.

Thanks bud.

ansible-doc

The module could be self-documenting with the proper text embedded.

Creating envs is not idempotent

I am creating an environment and installing some packages. However, when I run the playbook again, it doesn't say "OK", but takes a while and says "changed". I am using state: present instead of latest and would expect it to finish quickly with "OK" when the environment already exists. Is there any way to get it to do that?

Example task:

- name: Install amalea environment
  become: yes
  conda:
    executable: /opt/tljh/user/bin/mamba
    environment: amalea
    state: present
    channels:
      - conda-forge
      - defaults
    name:
      - python=3.9.7
      - pip

Edit: it seems the culprit is that I gave the environment name, not a path. The function list_envs parses the output of conda env list --json, which only returns the paths.

Python 3.10 fails

Installing python 3.10 fails as it is seen as 3.1. My task looks like:


- name: Create a conda environment
  conda:
    name: python
    version: 3.10
    environment: py310
    executable: "{{ mamba_prefix }}/bin/mamba"
    state: present

give the warning:

[WARNING]: The value "3.1" (type float) was converted to "'3.1'" (type string). If this does not look like what you expect, quote the
entire value to ensure it does not change.

Apparently 3.10 is converted to 3.1 and that version is unknown and it fails after thta.

If I put quotes around 3.10 like "3.10" then it works, however, the version is not read and just python 3.9 is installed.

Any idea how to fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.