Skip to content

Commit

Permalink
feat(language/python): add python3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Zitrone44 committed Aug 28, 2024
1 parent 8c7f43c commit dc31297
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions language/python/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ VERSION 0.8

SETUP:
FUNCTION
ARG NAMESPACE=base
ARG VERSION=3.11
ARG ADDITIONAL_PACKAGES
ARG COMPUTE_SPECIFIC_CHANNELS
ARG COMPUTE_SPECIFIC_PACKAGES
RUN micromamba install -n base -c pytorch -c conda-forge $COMPUTE_SPECIFIC_CHANNELS -y \
python pytorch torchvision torchaudio $COMPUTE_SPECIFIC_PACKAGES \
RUN micromamba install -n $NAMESPACE -c pytorch -c conda-forge $COMPUTE_SPECIFIC_CHANNELS -y \
python=$VERSION pytorch torchvision torchaudio $COMPUTE_SPECIFIC_PACKAGES \
lightning torchinfo tensorboard tensorboardx \
transformers diffusers datasets accelerate evaluate optimum \
sentence-transformers einops \
Expand All @@ -14,12 +17,20 @@ SETUP:
matplotlib seaborn plotly \
gradio streamlit \
d2l beautifulsoup4 langdetect spacy mastodon.py \
fastai::opencv-python-headless
fastai::opencv-python-headless \
$ADDITIONAL_PACKAGES

SETUP_CPU:
FUNCTION
DO +SETUP --COMPUTE_SPECIFIC_PACKAGES="cpuonly"
DO +SETUP --VERSION=3.11 --COMPUTE_SPECIFIC_PACKAGES="cpuonly"
DO +SETUP_38

SETUP_CUDA:
FUNCTION
DO +SETUP --COMPUTE_SPECIFIC_CHANNELS="-c nvidia" --COMPUTE_SPECIFIC_PACKAGES="pytorch-cuda=12.1"
DO +SETUP --VERSION=3.11 --COMPUTE_SPECIFIC_CHANNELS="-c nvidia" --COMPUTE_SPECIFIC_PACKAGES="pytorch-cuda=12.1"

SETUP_38:
FUNCTION
RUN micromamba create -n python38
DO +SETUP --NAMESPACE python38 --VERSION=3.8 --ADDITIONAL_PACKAGES="deepface ipykernel" --COMPUTE_SPECIFIC_PACKAGES="cpuonly"
RUN micromamba run -n python38 ipython kernel install --user --name python38 --display-name "Python 3.8 (ipykernel)"

0 comments on commit dc31297

Please sign in to comment.