Giter VIP home page Giter VIP logo

conda-pack-template's Introduction

Conda-pack template & rendering script to generate conda-pack'd envs.

Example

To render the configuration, run the following command:

Command:

$ python render.py -c configs/n2sn.yml

Output:

Script location: /Users/mrakitin/tmp/docker-build/conda-pack-template
#!/bin/bash

# To be run as:
# $ docker run -it --rm -v $PWD:/build quay.io/condaforge/linux-anvil-comp7:latest bash /build/gen-conda-packed-env-n2sn.sh

set -e

umask 0002

. /opt/conda/etc/profile.d/conda.sh

conda install conda -y

env_name="n2sn"
python_version="=3.9"
pkg="n2snusertools=0.3.6"
extra_packages=""
channels="-c nsls2forge -c defaults"

time conda create \
    -n ${env_name} \
    ${channels} --override-channels -y \
    python${python_version} conda-pack \
    ${pkg} \
    ${extra_packages}

conda activate ${env_name}

time conda env export \
    -n ${env_name} \
    -f /build/${env_name}.yml \
    ${channels} --override-channels

# Assuming the "build" dir is mounted via the "docker run -v ..."
time conda-pack -o /build/${env_name}.tar.gz

time openssl sha256 /build/${env_name}.tar.gz > /build/${env_name}-sha256sum.txt
chmod -v 664 /build/${env_name}[.-]*

conda deactivate

That should result in a file named gen-conda-packed-env-n2sn.sh in the current directory. For other configurations, a differently named file will be created.

conda-pack-template's People

Contributors

giorosario avatar junaishima avatar mrakitin avatar

Watchers

 avatar

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.