上下文
英特尔在Linux/MacOS指令上为Lava神经形态计算框架设置设备的说明提供了几个pip命令、一个git克隆命令和一些诗歌说明。我习惯于将pip命令集成到用于conda的environment.yml中,我认为git克隆命令也可以包含在environment.yml文件中。然而,我还不知道如何整合诗歌指令。
问题
因此,我想问:如何将以下安装脚本转换为(单个) conda环境yaml文件?
cd $HOME
pip install -U pip
pip install "poetry>=1.1.13"
git clone git@github.com:lava-nc/lava.git
cd lava
poetry config virtualenvs.in-project true
poetry install
source .venv/bin/activate
pytest尝试
我已经成功地在一个environment.yml中安装了Lava软件,使用:
# run: conda env create --file lava_environment.yml
# include new packages: conda env update --file lava_environment.yml
name: lava
channels:
- conda-forge
- conda
dependencies:
- anaconda
- conda:
# Run python tests.
- pytest=6.1.2
- pip
- pip:
# Auto generate docstrings
- pyment
# Run pip install on .tar.gz file in GitHub repository.
- https://github.com/lava-nc/lava/releases/download/v0.3.0/lava-nc-0.3.0.tar.gz我已经安装了:
conda env create --file lava_environment.yml然而,该从二进制文件中安装而不是从源。
发布于 2022-07-16 06:46:47
此environment.yml可用于安装和使用Lavav0.0.3框架:
# This file is to automatically configure your environment. It allows you to
# run the code with a single command without having to install anything
# (extra).
# First run: conda env create --file environment.yml
# If you change this file, run: conda env update --file environment.yml
# Instructions for this networkx-to-lava-nc repository only. First time usage
# On Ubuntu (this is needed for lava-nc):
# sudo apt upgrade
# sudo apt full-upgrade
# yes | sudo apt install gcc
# Conda configuration settings. (Specify which modules/packages are installed.)
name: nx2lava
channels:
- conda-forge
dependencies:
# Specify specific python version.
- python=3.8
# Run python tests.
- pytest-cov
# Generate plots.
- matplotlib
# Run graph software quickly.
- networkx
- pip
- pip:
# Run pip install on .tar.gz file in GitHub repository (For lava-nc only).
- https://github.com/lava-nc/lava/releases/download/v0.3.0/lava-nc-0.3.0.tar.gz
# Turns relative import paths into absolute import paths.
- absolufy-imports
# Auto format Python code to make it flake8 compliant.
- autoflake
# Scan Python code for security issues.
- bandit
# Code formatting compliance.
- black
# Correct code misspellings.
- codespell
# Verify percentage of code that has at least 1 test.
- coverage
# Auto formats the Python documentation written in the code.
- docformatter
# Auto generate docstrings.
- flake8
# Auto sort the import statements.
- isort
# Auto format Markdown files.
- mdformat
# Auto check static typing.
- mypy
# Auto generate documentation.
- pdoc3
# Auto check programming style aspects.
- pylint
# Auto generate docstrings.
- pyment
# Identify and remove dead code.
- vulture
# Include GitHub pre-commit hook.
- pre-commit
# Automatically upgrades Python syntax to the new Python version syntax.
- pyupgrade
# Another static type checker for python like mypy.
- pyright它还包括使用pre-commit的质量保证包。
发布于 2022-03-29 13:47:07
这可能对你有帮助:
cd $HOME
pip install -U pip
pip install "poetry>=1.1.13"
git clone git@github.com:lava-nc/lava.git
cd lava
poetry config virtualenvs.in-project true
poetry install
poetry run pytest在脚本中使用poetry时,更容易不手动激活venv (原因是source很难使用),而是使用poetry run 执行应该知道venv的命令。
https://stackoverflow.com/questions/71662125
复制相似问题