Skip to content
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

Use Pixi to resolve Conda environment #521

Open
pditommaso opened this issue Jun 7, 2024 · 1 comment
Open

Use Pixi to resolve Conda environment #521

pditommaso opened this issue Jun 7, 2024 · 1 comment

Comments

@pditommaso
Copy link
Contributor

pditommaso commented Jun 7, 2024

Wave uses Micromanba-docker to resolve and install Conda packages in the built containers.

Pixi should allows the creation of smaller containers in less time.

The goal of this issue is to implement the support for Pixi as a replacement for Micromamba.

Given Conda environment file, the Container image can be built using the following Dockerfile

FROM ghcr.io/prefix-dev/pixi:0.18.0 AS build

COPY env.yml /app/env.yml
WORKDIR /app

RUN pixi init --import /app/env.yml
RUN pixi add conda-forge::procps-ng

FROM ubuntu:lunar AS release
COPY --from=build /app/.pixi/envs/default /app/.pixi/envs/default
ENV PATH="/app/.pixi/envs/default/bin:$PATH"

The above above approach allows the use of a generic base image for the target container image (in place of ubuntu:lunar)

As a secondary goal, it should be evaluated how to make faster builds using the shared repodata approach as described here.

@pditommaso
Copy link
Contributor Author

Worth noting that pixi also automatically creates the environment lock file.

# ls -la 
total 36
drwxr-xr-x 1 root root 4096 Aug 12 21:33 .
drwxr-xr-x 1 root root 4096 Aug 12 21:34 ..
-rw-r--r-- 1 root root   63 Aug 12 21:33 .gitattributes
-rw-r--r-- 1 root root   27 Aug 12 21:33 .gitignore
drwxr-xr-x 1 root root 4096 Aug 12 21:33 .pixi
-rw-r--r-- 1 root root   55 Jun  7 16:28 env.yml
-rw-r--r-- 1 root root 5519 Aug 12 21:33 pixi.lock
-rw-r--r-- 1 root root  244 Aug 12 21:33 pixi.toml

https://pixi.sh/v0.20.0/features/lockfile/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant