Giter Site home page Giter Site logo

minicondadistro's Introduction

mcinstall

image

image

image

image

image

image

image

image

image

image

image

A script to quickly make/provision a fresh Miniconda installation from scratch.

The goal of this script is to quickly install a fresh Miniconda across different operating systems and use it in a CI/CD context, too. It will download a Miniconda binary based on your operating system, unpack the binary and install it locally. It was tested on MacOS and Linux ok, has decent Windows support and also aims to support ARM6 and ARM7 on the Raspberry Pi via Berryconda (sadly no longer maintained).

This script has no external dependencies, but expects to be run with Python 3.5+, 3.5 only because this is likely still the prevalent Python 3 version on Rasbian.

N.B. This project is often updated online which is why its git history might look strange...

Installation

Very briefly, it's pip install mcinstall. More details are available in INSTALL.rst.

Sample Usage

If you run it like this:

mcinstall ~/Downloads/mc3

it will run a command like this on macOS (using some defaults and decent system introspection) to create a conda base installation:

bash Miniconda3-latest-MacOSX-x86_64.sh -b -f -p ~/Downloads/mc3

This can be activated then with a command like this:

source ~/Downloads/mc3/bin/activate

Windows Example:

On Windows if you execute this command:

mcinstall %USERPROFILE%\downloads\mc3

it will run a command like this:

start /wait "" Miniconda3-latest-Windows-x86_64.exe /InstallationType=JustMe /RegisterPython=0 /S /D=%USERPROFILE%\downloads\mc3

This conda installation can be activated then with a command like this:

%USERPROFILE%\mc3\condabin\activate

Suggested test:

mcinstall --verbose --pip-dependencies jupyter,torch ~/Downloads/torchy
source ~/Downloads/torchy/bin/activate
python -c "import torch; print('ok')"

Suggested test dependencies files:

$ more ~/Downloads/reqs.txt
asciinema
torch
torchvision

$ more ~/Downloads/env.yml
name: test
channels:
  - conda-forge
dependencies:
  - voila

Sample run (replaced home directory with ~ manually):

$ mcinstall --verbose --pip-dependencies jupyter,torch ~/Downloads/torchy
Making directory ~/Downloads/torchy.
Downloading https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh ...
Copying to ~/Downloads/Miniconda3-latest-MacOSX-x86_64.sh ...
Running command: bash ~/Downloads/Miniconda3-latest-MacOSX-x86_64.sh -b -f -p ~/Downloads/torchy
PREFIX=~/Downloads/torchy
Unpacking payload ...
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

[...]

Preparing transaction: ...working... done
Executing transaction: ...working... done
installation finished.

Running command: ~/Downloads/torchy/bin/pip install jupyter
[...]

Running command: ~/Downloads/torchy/bin/pip install torch
[...]

Run this to start using your fresh Miniconda: "source ~/Downloads/torchy/bin/activate".

Example command to pass index-url for pip:

mcinstall --verbose --pip-dependencies  pypi_pkg_test --pip-index-url https://test.pypi.org/simple/ ~/Downloads/torchy

Example command to pass extra-index-url for pip:

mcinstall --verbose --pip-dependencies  pypi_pkg_test --pip-index-url https://test.pypi.org/simpletest/ --pip-extra-index-url https://test.pypi.org/simple/ ~/Downloads/torchy

Example to pass multiple extra-index-url for pip:

mcinstall --verbose --pip-dependencies  pypi_pkg_test --pip-index-url https://test.pypi.org/simpletest/ --pip-extra-index-url https://test.pypi.org/simpletest1/,https://test.pypi.org/simple/ ~/Downloads/torchy

Sample log file (mcinstall.log):

wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
mv Miniconda3-latest-MacOSX-x86_64.sh ~/Downloads/Miniconda3-latest-MacOSX-x86_64.sh
bash ~/Downloads/Miniconda3-latest-MacOSX-x86_64.sh -b -f -p ~/Downloads/torchy
source ~/Downloads/torchy/bin/activate
~/Downloads/torchy/bin/pip install jupyter
~/Downloads/torchy/bin/pip install torch

minicondadistro's People

Contributors

deeplook avatar deepsourcebot avatar omanges avatar sackh 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.