This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9fc63a4
commit e82902f
Showing
4 changed files
with
112 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Linux (CUDA, manual) | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "semver" | ||
required: true | ||
default: "latest" | ||
type: string | ||
|
||
dependencies: | ||
description: "optional dependencies" | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
build-semver: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: ["3.9", "3.10", "3.11"] | ||
cuda: ["11", "12"] | ||
dependencies: ["", "dev", "tutorials"] | ||
|
||
uses: ./.github/workflows/linux_cuda.yaml | ||
with: | ||
python: ${{ matrix.python }} | ||
cuda: ${{ matrix.cuda }} | ||
version: ${{ inputs.version }} | ||
dependencies: ${{ matrix.dependencies }} | ||
|
||
secrets: inherit | ||
|
||
build-stable: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: ["3.9", "3.10", "3.11"] | ||
cuda: ["11", "12"] | ||
dependencies: ["", "dev", "tutorials"] | ||
|
||
uses: ./.github/workflows/linux_cuda.yaml | ||
with: | ||
python: ${{ matrix.python }} | ||
cuda: ${{ matrix.cuda }} | ||
version: stable | ||
dependencies: ${{ matrix.dependencies }} | ||
|
||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
FROM condaforge/miniforge3:latest AS base | ||
|
||
RUN head -n -1 "${HOME}/.bashrc" > "${HOME}/tmp.bashrc" ; \ | ||
mv "${HOME}/tmp.bashrc" "${HOME}/.bashrc" | ||
|
||
ARG PYTHON_VERSION | ||
RUN mamba create --copy -y -p /env \ | ||
python=${PYTHON_VERSION} -c conda-forge && \ | ||
mamba clean -ayf | ||
|
||
RUN mamba install -y -p /env \ | ||
gcc cxx-compiler -c conda-forge && \ | ||
mamba clean -ayf | ||
|
||
ARG CUDA_VERSION=11 | ||
RUN CONDA_OVERRIDE_CUDA=${CUDA_VERSION} mamba install -y -p /env \ | ||
pytorch torchvision torchaudio pytorch-cuda=${CUDA_VERSION} \ | ||
-c pytorch -c nvidia && \ | ||
mamba clean -ayf | ||
|
||
ARG CUDA_VERSION=11 | ||
RUN mamba run -p /env \ | ||
python -m pip install --no-cache-dir -U "jax[cuda${CUDA_VERSION}_pip]" \ | ||
-f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html && \ | ||
mamba run -p /env \ | ||
python -m pip cache purge | ||
|
||
ENV PATH "/env/bin:$PATH" | ||
|
||
RUN conda init --reverse && \ | ||
rm -rf $(conda info --base) && \ | ||
rm -f "${HOME}/.condarc" && \ | ||
rm -rf ${HOME}/.conda && \ | ||
rm -rf /opt/conda | ||
|
||
FROM base AS latest | ||
ARG DEPENDENCIES="" | ||
RUN pip install --no-cache-dir "scvi-tools[${DEPENDENCIES}] @ git+https://github.com/scverse/scvi-tools" && \ | ||
pip cache purge | ||
|
||
FROM base AS stable | ||
ARG DEPENDENCIES="" | ||
RUN pip install -U --no-cache-dir "scvi-tools[${DEPENDENCIES}]" && \ | ||
pip cache purge | ||
|
||
FROM base AS branch | ||
ARG SCVI_TOOLS_VERSION=main | ||
ARG DEPENDENCIES="" | ||
RUN pip install --no-cache-dir "scvi-tools[${DEPENDENCIES}] @ git+https://github.com/scverse/scvi-tools@${SCVI_TOOLS_VERSION}" && \ | ||
pip cache purge | ||
|
||
FROM base AS semver | ||
ARG SCVI_TOOLS_VERSION=latest | ||
ARG DEPENDENCIES="" | ||
RUN pip install --no-cache-dir "scvi-tools[${DEPENDENCIES}]==${SCVI_TOOLS_VERSION}" && \ | ||
pip cache purge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters