Lockfiles for conda
Project description
conda-lock
Conda lock is a lightweight library that can be used to generate fully reproducible lock files for conda environments.
It does this by performing multiple solves for conda targeting a set of platforms you desire lockfiles for.
This also has the added benefit of acting as an external presolve for conda as the lockfiles it generates results in the conda solver not being invoked when installing the packages from the generated lockfile.
why?
Conda environment.yaml files are very useful for defining desired environments but there are times when we want to be able to EXACTLY reproduce an environment by just installing and downloading the packages needed.
This is particularly handy in the context of a gitops style setup where you use conda to provision environments in various places
Dockerfile example
In order to use conda-lock in a docker-style context you want to add the lockfile to the
docker container. In order to refresh the lock file just run conda-lock
again.
Dockerfile
environment.yaml
* conda-linux-64.lock
# Dockerfile
# Build container
FROM continuumio/miniconda:latest as conda
ADD conda-linux-64.lock /locks/conda-linux-64.lock
RUN conda create -p /opt/env --copy --file /locks/conda-linux-64.lock
# Primary container
FROM gcr.io/distroless/base-debian10
COPY --from=conda /opt/env /opt/env
installation
pip install conda-lock
usage
# generate the lockfiles
conda-lock -f environment.yml -p osx-64 -p linux-64
# create an environment from the lockfile
conda create -n my-locked-env --file conda-linux-64.lock
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file conda_lock-0.2.0.tar.gz
.
File metadata
- Download URL: conda_lock-0.2.0.tar.gz
- Upload date:
- Size: 35.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0.post20200209 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 229ab0ceca3ef0b6107f87c56b39604770d8d474ed27c084166be29191cc180f |
|
MD5 | 413772accd4eab77a96d7e567bca8ea0 |
|
BLAKE2b-256 | a92ed86b4575484c58dfa3b56db4573acb833b0a6de28a23f8da4d117688e92b |
Provenance
File details
Details for the file conda_lock-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: conda_lock-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0.post20200209 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5b70d48c0970b19c17d1d54a7c9037172f2c33e12301eaec2e0c7cf779f0c88 |
|
MD5 | 8d4174fed78475f035d4aba7b117b88c |
|
BLAKE2b-256 | 81772d0f7e89fc262e5f1c05a537e441f6b0de297d9135065bf05fa4c79c0e1b |