conda-pack | Package conda environments for redistribution | Machine Learning library
kandi X-RAY | conda-pack Summary
kandi X-RAY | conda-pack Summary
conda-pack is a command line tool for creating relocatable conda environments. This is useful for deploying code in a consistent environment, potentially in locations where python or conda isn't already installed. See the documentation for more information. Conda-pack is offered under a New BSD license; see the license file.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Returns a Commandclass instance based on the given cmdclass
- Get project root directory
- Create a ConfigParser from a root
- Write data to the stream
- Pack a conda package
- Load environment from given prefix
- Create a prefix from the default prefix
- Exclude files that match pattern
- Timer function
- Format a time
- Update the progress bar
- Create versioneer config file
- Run git commands
- Install versioneer
- Add files to the zip archive
- Scans the given setup py and returns a boolean indicating whether it is missing
- Add source to the target directory
- Replace prefix in path
- Process the data from the pool
- Add source bytes to source
- Writes the header
- Write the footer
- Build the argument parser
conda-pack Key Features
conda-pack Examples and Code Snippets
Community Discussions
Trending Discussions on conda-pack
QUESTION
I do use anaconda on an ubuntu 20.04 and since a week or so I have a problem with processes like
...ANSWER
Answered 2022-Apr-01 at 10:59So after a while an update of conda fixed this issue. However, this was strange behaviour.
I did reinstall spyder via pip3 command of the anaconda installation. After that I updated anaconda and conda via conda command.
QUESTION
I have a multi-stage Dockerfile for a JupyterLab image. There are three stages:
server
kernel
:mamba create -y -n /tmp/kernel-packages/myenv ...
runner
:
ANSWER
Answered 2022-Mar-22 at 17:03The --prefix
argument is the equivalent - just that some Conda packages use hardcoded paths, hence the issue you encounter.
conda-prefix-replacement
To properly move a Conda environment to a new prefix via a COPY operation one would need to run the conda-prefix-replacement
tool (a.k.a., cpr
) to ensure that all files with hardcoded paths get updated to the new location. Presumably, conda-pack
is doing a similar thing, just under-the-hood.
For your purposes, you might consider pre-running cpr
on the environment(s) in the kernel image so that they are ready to work in the deployed location. Though that would mean always COPYing to the same location.
See the cpr
repository for details on use.
QUESTION
After I activate my conda environment and I run which python
, I get the following
ANSWER
Answered 2022-Mar-18 at 18:06This article helped me debug this issue. I just had to make sure I deactivated out of conda environment completely even the (base)
environment. For some reason even after deactivating from my po
environment, it went to base
environment
QUESTION
I can't find the proper way to add dependencies to my Azure Container Instance for ML Inference.
I basically started by following this tutorial : Train and deploy an image classification model with an example Jupyter Notebook
It works fine.
Now I want to deploy my trained TensorFlow model for inference. I tried many ways, but I was never able to add python dependencies to the Environment.
From the TensorFlow curated environmentUsing AzureML-tensorflow-2.4-ubuntu18.04-py37-cpu-inference :
...ANSWER
Answered 2022-Jan-24 at 12:45If you want to create a custom environment you can use the below code to set the env configuration.
Creating the enviromentmyenv = Environment(name="Environment")
myenv.docker.enabled = True
myenv.python.conda_dependencies = CondaDependencies.create(conda_packages = ['numpy','scikit-learn','pip','pandas'], pip_packages = ['azureml-defaults~= 1.34.0','azureml','azureml-core~= 1.34.0',"azureml-sdk",'inference-schema','azureml-telemetry~= 1.34.0','azureml- train-automl~= 1.34.0','azure-ml-api-sdk','python-dotenv','azureml-contrib-server','azureml-inference-server-http'])
QUESTION
I install new modules via the following command in my miniconda
...ANSWER
Answered 2022-Jan-06 at 20:11Consider creating a separate environment, e.g.,
QUESTION
Good day
I am getting an error while importing my environment:
...ANSWER
Answered 2021-Dec-03 at 09:22Build tags in you environment.yml are quite strict requirements to satisfy and most often not needed. In your case, changing the yml file to
QUESTION
I am trying to monkey patch a Python package before using conda pack
to package up all of the packages for deployment.
The script sets up conda
:
ANSWER
Answered 2021-Nov-24 at 01:55I wasn't able to get the monkey patching to work, but I was able to figure out that ctypes
is not part of numpy
and rather is part of Python's standard library. So conda pack
could very well treat Python standard libraries a bit differently.
So I gave up on monkey patching and found out that upgrading my Python version fixed the underlying issue.
Thanks 🙏
QUESTION
I have installed PySpark 3.1.2 along with OpenJDK-1.8 to connect with a docker instance of Cassandra 4.0.1. I followed the instructions as in https://towardsdatascience.com/installing-pyspark-with-java-8-on-ubuntu-18-04-6a9dea915b5b and successfully installed the required versions.
I'm using anaconda environment, after installation I noticed that my Python version got automatically downgraded to 3.5 which is not supported by Pyspark(even in all environments where I had different python versions earlier, it's now 3.5). I read that Pyspark needs python3.6+. I tried everything possible to upgrade the python version to 3.6+ but it's not happening. When I try conda upgrade python some upgrades and removals happen but python is still 3.5.
conda update python gives:
...ANSWER
Answered 2021-Nov-08 at 16:26I resolved the issue by manually installing pyspark and making a minor change in the environment variables.
After downloading the required version of spark, you need to configure environment variables. There are a few Spark home paths you need to add to the user profile as follows,
QUESTION
I wanted to reinstall Miniconda. I have first removed the entire Miniconda install directory, edited the bashrc file to remove the Miniconda directory from the PATH environment, and removed the hidden condarc file and conda folder from the home directory.
Then, I downloaded Miniconda from https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh, and tried to install it with bash Miniconda3-py39_4.10.3-Linux-x86_64.sh
.
Doing this, I got the following UnsatisfiableError:
...ANSWER
Answered 2021-Sep-30 at 04:52Most of the conflicts are superfluous. The key ones are right at the end: all those packages require glibc >= 2.17
and your system (i.e., OS) only has GLIBC 2.12. So, we're talking CentOS 6 or similar RHEL, and this is a known issue that makes the newer Miniconda builds uninstallable for you. If you're deadset on Miniconda, you'll have to hit up the archive for an old version, as suggested on the install page (which, BTW, notes CentOS 7+). Unfortunately, I don't know which Miniconda version was the last to support GLIBC 2.12.
Fortunately, most of Conda Forge continues to build on COS6 images, so try out a Miniforge variant instead of Miniconda. I highly recommend Mambaforge.
And yes, testing on the centos6
Docker image, the latest Mambaforge installs and runs just fine.
QUESTION
I'm trying to follow the steps at https://conda.github.io/conda-pack/index.html?highlight=conda%20unpack to pack & unpack a conda env.
However, I don't see the conda-unpack
script. Where should it be located?
ANSWER
Answered 2021-Jul-27 at 08:43The conda-unpack
script is in the .tar.gz
that you have created with conda-pack
. It is located in the Scripts
folder of the extracted environment. It should therefore be available after unpacking and activating the environment.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install conda-pack
You can use conda-pack like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page