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 pip-compile to help with consistent Python dependency resolution #371

Merged
merged 151 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
abb6f97
wip
yhtang Oct 23, 2023
068aab9
fix typo
yhtang Oct 23, 2023
fb7cf0b
wip
yhtang Oct 24, 2023
4b0c406
wip
yhtang Oct 24, 2023
4044450
wip
yhtang Oct 24, 2023
38da8a1
wip
yhtang Oct 24, 2023
9ad94c8
wip
yhtang Oct 24, 2023
1aac03a
use full clone
yhtang Oct 25, 2023
42ec9bb
update pip-tools script
yhtang Oct 25, 2023
2f02023
update pip-tools script
yhtang Oct 25, 2023
ad12e78
update pip-tools script
yhtang Oct 25, 2023
bdc34c8
fix t5x dockerfile
yhtang Oct 25, 2023
a5c478e
fix t5x dockerfile
yhtang Oct 25, 2023
b4fd2d8
test flax hack
yhtang Oct 25, 2023
fe6e3d8
flax hack
yhtang Oct 25, 2023
ad83f21
hack for git top of tree Flax dependency
yhtang Nov 2, 2023
b7e1a6c
update URL req
yhtang Nov 3, 2023
0dd9617
update
yhtang Nov 3, 2023
dc44fe4
editability
yhtang Nov 3, 2023
acf2acf
editability
yhtang Nov 3, 2023
027cd63
editability
yhtang Nov 3, 2023
7c10ffa
editability
yhtang Nov 3, 2023
f1046d2
editability
yhtang Nov 3, 2023
bbf2c21
wip
yhtang Nov 3, 2023
cd0d5d1
wip
yhtang Nov 6, 2023
e973c9a
wip
yhtang Nov 6, 2023
1f6d4f1
fix shell
yhtang Nov 6, 2023
6d9ae00
fix arg order
yhtang Nov 6, 2023
cc66ce6
remove standalone TE build
yhtang Nov 6, 2023
fe8708a
build TE wheel in JAX
yhtang Nov 6, 2023
b1e332e
pax wip
yhtang Nov 6, 2023
62ca85b
add pax build
yhtang Nov 6, 2023
bc6c702
add pax build
yhtang Nov 6, 2023
ff6ec2a
fix CI
yhtang Nov 6, 2023
67df9b8
debug pax build
yhtang Nov 6, 2023
d67966a
debug pax build
yhtang Nov 6, 2023
1ba1bff
debug pax build
yhtang Nov 6, 2023
e8f87d2
fix EOF
yhtang Nov 6, 2023
24b4931
redesign workflow
yhtang Nov 7, 2023
e2c34b4
fix job step id
yhtang Nov 7, 2023
7ee441b
arm64 build
yhtang Nov 7, 2023
4f4d909
arm64 build
yhtang Nov 7, 2023
b777244
arm64 build
yhtang Nov 8, 2023
c4c22af
arm64 build
yhtang Nov 8, 2023
736246a
add sitrep to base build
yhtang Nov 8, 2023
bc4b6db
lingvo
yhtang Nov 8, 2023
ce1cf94
lingvo
yhtang Nov 8, 2023
9ac7367
lingvo
yhtang Nov 8, 2023
44d3026
refactor pax arm64 build
yhtang Nov 8, 2023
5c47fcb
refactor pax arm64 build wip
yhtang Nov 8, 2023
139e539
refactor pax arm64 build wip
yhtang Nov 8, 2023
5e2a5ad
refactor pax arm64 build wip
yhtang Nov 8, 2023
cb99d71
refactor pax arm64 build wip
yhtang Nov 9, 2023
0959264
pax arm64
yhtang Nov 9, 2023
314db99
redesign CI
yhtang Nov 9, 2023
8943e9f
redesign CI
yhtang Nov 9, 2023
94115ba
refactor CI
yhtang Nov 9, 2023
ee11851
refactor CI
yhtang Nov 9, 2023
6b6fc92
refactor CI
yhtang Nov 9, 2023
cf66cfd
refactor CI
yhtang Nov 9, 2023
9fd4503
refactor CI
yhtang Nov 9, 2023
f2e80a1
file permission
yhtang Nov 9, 2023
7db2f84
refactor CI
yhtang Nov 9, 2023
7090349
refactor CI
yhtang Nov 9, 2023
6900d86
refactor CI
yhtang Nov 9, 2023
06327c1
refactor CI
yhtang Nov 9, 2023
618a3f5
refactor CI
yhtang Nov 9, 2023
c659d3c
refactor CI
yhtang Nov 9, 2023
8395604
refactor CI
yhtang Nov 9, 2023
2ab0cc9
refactor CI
yhtang Nov 9, 2023
69c17fc
refactor CI
yhtang Nov 9, 2023
d9400d3
refactor CI
yhtang Nov 9, 2023
33dc9ac
refactor CI
yhtang Nov 9, 2023
4fc18dc
fix output tag order
yhtang Nov 9, 2023
b806a5a
t5x arm64 build not ready yet
yhtang Nov 9, 2023
8391f74
nightly T5X build
yhtang Nov 9, 2023
984a19a
nightly T5X build
yhtang Nov 9, 2023
715f62c
fix TE/T5X bug
yhtang Nov 9, 2023
7f06cb8
add TE examples and tests to wheel
yhtang Nov 9, 2023
92b6d0a
allow TE parallel build
yhtang Nov 9, 2023
c4f5b84
jax publish
yhtang Nov 9, 2023
bcfd0e4
rename staging to mealkit
yhtang Nov 9, 2023
12a2fd6
fix nightly
yhtang Nov 9, 2023
1925b14
fix nightly
yhtang Nov 9, 2023
6e71c64
bug fix
yhtang Nov 10, 2023
adb10da
bug fix
yhtang Nov 10, 2023
b956b30
bug fix
yhtang Nov 10, 2023
c727607
fix
yhtang Nov 10, 2023
d450ceb
fix TE test
yhtang Nov 10, 2023
fc2c6e6
fix pax test
yhtang Nov 10, 2023
f9c6cd3
fix TE test
yhtang Nov 10, 2023
7230589
merge CI yaml
yhtang Nov 10, 2023
429ae4d
fix arg
yhtang Nov 10, 2023
de32e4f
rerun TE/PAX test
yhtang Nov 10, 2023
43a57c6
Merge branch 'main' of github.com:NVIDIA/JAX-Toolbox into add-pip-com…
yhtang Nov 10, 2023
ab73f6b
fix TE multi-device test
yhtang Nov 10, 2023
9eb97e8
fix lzma build issue
yhtang Nov 10, 2023
772f606
edit TE test name
yhtang Nov 11, 2023
fcb29b4
fix TE arm64 test install error
yhtang Nov 13, 2023
22d400b
remove --install option from get-source.sh
yhtang Nov 13, 2023
e9f074f
fix TE arm64 test install error
yhtang Nov 13, 2023
602002f
disable sandbox
yhtang Nov 13, 2023
12a57eb
i'm jet-lagged
yhtang Nov 13, 2023
dbaba5b
use Pax image for TE testing
yhtang Nov 13, 2023
ccafb52
Fix job dependency
yhtang Nov 13, 2023
6974a3a
Add nightly rosetta build and test
DwarKapex Nov 16, 2023
c5f8f23
wip: fix typo
DwarKapex Nov 16, 2023
1d9d282
wip: build sandbox on dispatch
DwarKapex Nov 16, 2023
e6bf405
wip: fix build_rosetta
DwarKapex Nov 16, 2023
4c58356
wip: update yaml structure for nightly build of rosseta y5x
DwarKapex Nov 16, 2023
1fe5f69
wip: update yaml structure for nightly build of rosseta t5x
DwarKapex Nov 16, 2023
95f5729
wip: fix yaml structure for nightly build of rosseta t5x
DwarKapex Nov 16, 2023
d89f93f
wip: fix yaml structure for nightly build of rosseta pax
DwarKapex Nov 16, 2023
08fb7f9
wip: fix typo in yaml structure for nightly build of rosseta pax
DwarKapex Nov 16, 2023
a7f95f1
wip: fix typo in yaml structure for nightly build of rosseta pax 2
DwarKapex Nov 16, 2023
2d35714
wip
DwarKapex Nov 16, 2023
5ae2e79
wip:
DwarKapex Nov 16, 2023
ce8ba2d
use the _publish_container reusable workflow for base container weekl…
yhtang Nov 16, 2023
6501ae9
fix base build output arg name error
yhtang Nov 16, 2023
aae5865
wip: add base build
DwarKapex Nov 16, 2023
a98bf46
Merge branch 'add-pip-compile' of github.com:NVIDIA/JAX-Toolbox into …
DwarKapex Nov 16, 2023
94d2db7
wip: add base build
DwarKapex Nov 16, 2023
9bb80b4
wip: add base build
DwarKapex Nov 16, 2023
3442369
wip: build t5x and rosetta/pax
DwarKapex Nov 16, 2023
f567e2c
wip: build all in question
DwarKapex Nov 16, 2023
efb339c
wip: build all in question 2
DwarKapex Nov 16, 2023
dca817c
Build whole pipeline
DwarKapex Nov 16, 2023
356adbf
Merge origin/main
DwarKapex Nov 16, 2023
44d7897
Build rosetta in CI pipeline
DwarKapex Nov 16, 2023
420162f
Build rosetta in CI pipeline
DwarKapex Nov 16, 2023
2a12b05
Debug rosetta build
DwarKapex Nov 16, 2023
507c6c1
Debug rosetta build: correct container
DwarKapex Nov 16, 2023
81d03ef
Debug rosetta build: fix odd issue from docker file
DwarKapex Nov 17, 2023
f546c9b
Full pipelilne 2
DwarKapex Nov 17, 2023
85a8817
Addressed Ann's comments
DwarKapex Nov 17, 2023
630d1df
Full pipelilne: revert _sandbox.yaml
DwarKapex Nov 17, 2023
dc37804
Merge branch 'add-pip-compile' of github.com:NVIDIA/JAX-Toolbox into …
DwarKapex Nov 17, 2023
1cf80c2
Rename nightly rosseta to be able to sun nigthly rosseta pax build ma…
DwarKapex Nov 17, 2023
0885302
Add arch to rosetta-pax build
DwarKapex Nov 17, 2023
a97659e
Add arch to rosetta-pax build
DwarKapex Nov 17, 2023
2744e67
Add arch to rosetta-pax build: fix typo
DwarKapex Nov 17, 2023
858881b
Add arch to rosetta-pax build: fix typo
DwarKapex Nov 17, 2023
2d6a11c
Add arch to rosetta-pax build: fix typo
DwarKapex Nov 17, 2023
332bf98
Addressed Terry's comments
DwarKapex Nov 20, 2023
2bd1999
Pass git username and email thru params
DwarKapex Nov 20, 2023
873b5a5
Address Terry's final comments
DwarKapex Nov 20, 2023
770990d
Address Terry's LGTM comments
DwarKapex Nov 21, 2023
4ae4189
Rosetta dockerfiles to have 2 stages: mealkit and final
DwarKapex Nov 21, 2023
85182ef
Rosetta dockerfiles: remore __pychache__ deletion
DwarKapex Nov 21, 2023
6e7b418
Merge origin/main
DwarKapex Nov 21, 2023
4ea1742
Reverte test_destribution
DwarKapex Nov 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/container/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
ARG BASE_IMAGE=nvidia/cuda:12.2.0-devel-ubuntu22.04
ARG GIT_USER_NAME="JAX Toolbox"
ARG GIT_USER_EMAIL=jax@nvidia.com

FROM ${BASE_IMAGE}
ARG GIT_USER_EMAIL
ARG GIT_USER_NAME

###############################################################################
## Install Python and essential tools
Expand Down Expand Up @@ -31,8 +35,8 @@ RUN apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN <<"EOF" bash -ex
git config --global user.name "JAX Toolbox"
git config --global user.email "jax@nvidia.com"
git config --global user.name "${GIT_USER_NAME}"
git config --global user.email "${GIT_USER_EMAIL}"
EOF
RUN pip install --upgrade --no-cache-dir pip pip-tools && rm -rf ~/.cache/*
RUN mkdir -p /opt/pip-tools.d
Expand Down
8 changes: 6 additions & 2 deletions .github/container/Dockerfile.jax
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ ARG SRC_PATH_JAX=/opt/jax
ARG SRC_PATH_XLA=/opt/xla-source
ARG SRC_PATH_FLAX=/opt/flax
ARG SRC_PATH_TE=/opt/transformer-engine-source
ARG GIT_USER_NAME="JAX Toolbox"
ARG GIT_USER_EMAIL=jax@nvidia.com

ARG BAZEL_CACHE=/tmp
ARG BUILD_DATE
Expand All @@ -27,6 +29,8 @@ ARG REF_XLA
ARG SRC_PATH_JAX
ARG SRC_PATH_XLA
ARG BAZEL_CACHE
ARG GIT_USER_NAME
ARG GIT_USER_EMAIL

RUN git clone "${REPO_JAX}" "${SRC_PATH_JAX}" && cd "${SRC_PATH_JAX}" && git checkout ${REF_JAX}
RUN --mount=type=ssh \
Expand All @@ -37,8 +41,8 @@ RUN --mount=type=ssh \
RUN <<EOF bash -ex
cd ${SRC_PATH_XLA}

git config user.name "JAX Toolbox"
git config user.email "jax@nvidia.com"
git config --global user.name "${GIT_USER_NAME}"
git config --global user.email "${GIT_USER_EMAIL}"
git remote add -f ashors1 https://github.com/ashors1/xla
git cherry-pick --allow-empty $(git merge-base ashors/main ashors1/revert-84222)..ashors1/revert-84222
git remote remove ashors1
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/_build_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ on:
description: 'Name of the endpoint JSON file for shields.io badge'
required: false
default: 'badge-base-build'
GIT_USER_NAME:
type: string
description: 'Username in GIT to perform git pull/push'
required: false
default: 'JAX Toolbox'
GIT_USER_EMAIL:
type: string
description: 'User email in GIT to perform git pull/push'
required: false
default: 'jax@nvidia.com'

outputs:
DOCKER_TAG:
description: "Tag of the image built"
Expand Down Expand Up @@ -92,6 +103,8 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_USER_NAME=${{ inputs.GIT_USER_NAME }}
GIT_USER_EMAIL=${{ inputs.GIT_USER_EMAIL }}
BUILD_DATE=${{ inputs.BUILD_DATE }}
${{ inputs.BASE_IMAGE != 'latest' && format('BASE_IMAGE={0}', inputs.BASE_IMAGE) }}

Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/_build_jax.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ on:
description: 'Name of the endpoint JSON file for shields.io badge'
required: false
default: 'badge-jax-build'
GIT_USER_NAME:
type: string
description: 'Username in GIT to perform git pull/push'
required: false
default: 'JAX Toolbox'
GIT_USER_EMAIL:
type: string
description: 'User email in GIT to perform git pull/push'
required: false
default: 'jax@nvidia.com'
outputs:
DOCKER_TAG_MEALKIT:
description: "Tags of the 'mealkit' image built"
Expand Down Expand Up @@ -154,6 +164,8 @@ jobs:
REF_JAX=${{ inputs.REF_JAX }}
REF_XLA=${{ inputs.REF_XLA }}
REF_TE=${{ inputs.REF_TE }}
GIT_USER_NAME=${{ inputs.GIT_USER_NAME }}
GIT_USER_EMAIL=${{ inputs.GIT_USER_EMAIL }}

- name: Set docker metadata - final
id: final-metadata
Expand Down
27 changes: 25 additions & 2 deletions .github/workflows/_test_distribution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,30 @@ name: ~test core distribution logic

on:
workflow_call:
inputs:
GIT_USER_NAME:
type: string
description: 'Username in GIT to perform git pull/push'
required: false
default: 'JAX Toolbox'
GIT_USER_EMAIL:
type: string
description: 'User email in GIT to perform git pull/push'
required: false
default: 'jax@nvidia.com'
workflow_dispatch:
inputs:
GIT_USER_NAME:
type: string
description: 'Username in GIT to perform git pull/push'
required: false
default: 'JAX Toolbox'
GIT_USER_EMAIL:
type: string
description: 'User email in GIT to perform git pull/push'
required: false
default: 'jax@nvidia.com'


jobs:
test-create-distribution:
Expand All @@ -17,8 +40,8 @@ jobs:

- name: Set git login for tests
run: |
git config --global user.email "jax@nvidia.com"
git config --global user.name "JAX-Toolbox CI"
git config --global user.name "${GIT_USER_NAME}"
git config --global user.email "${GIT_USER_EMAIL}"

- name: Check out the repository under ${GITHUB_WORKSPACE}
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-rosetta-pax-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
BASE_IMAGE:
type: string
description: 'PAX image built by NVIDIA/JAX-Toolbox'
default: 'ghcr.io/nvidia/upstream-pax:mealkit'
default: ''
required: true
PUBLISH:
type: boolean
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-rosetta-t5x-build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
BASE_IMAGE:
type: string
description: 'T5x image built by NVIDIA/JAX-Toolbox'
default: 'ghcr.io/nvidia/upstream-t5x:latest'
default: ''
required: true
PUBLISH:
type: boolean
Expand Down
40 changes: 28 additions & 12 deletions rosetta/Dockerfile.pax
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# syntax=docker/dockerfile:1-labs
ARG BASE_IMAGE=ghcr.io/nvidia/upstream-pax:latest
ARG BASE_IMAGE=ghcr.io/nvidia/upstream-pax:mealkit
ARG GIT_USER_EMAIL=jax@nvidia.com
ARG GIT_USER_NAME=NVIDIA
ARG SRC_PATH_PAXML=/opt/paxml
ARG SRC_PATH_PRAXIS=/opt/praxis
# These patchlist paths should be relative to this script
ARG PAXML_PATCHLIST=patchlist-paxml.txt
ARG PRAXIS_PATCHLIST=patchlist-praxis.txt

FROM scratch as rosetta-source
ARG SRC_PATH_PAXML
Expand All @@ -17,30 +20,43 @@ ADD --keep-git-dir=true https://github.com/google/paxml.git#main /
FROM scratch as praxis-mirror-source
ADD --keep-git-dir=true https://github.com/google/praxis.git#main /

FROM ${BASE_IMAGE} AS rosetta
###############################################################################
### Download source and add auxiliary scripts
################################################################################

FROM ${BASE_IMAGE} AS mealkit
ENV ENABLE_TE=1

ARG GIT_USER_EMAIL
ARG GIT_USER_NAME
RUN <<EOF bash -e
git config --global user.email "${GIT_USER_EMAIL}"
git config --global user.name "${GIT_USER_NAME}"
EOF
ARG PAXML_PATCHLIST
ARG PRAXIS_PATCHLIST

COPY --from=rosetta-source / /opt/rosetta
WORKDIR /opt/rosetta
RUN --mount=target=/opt/pax-mirror,from=pax-mirror-source,readwrite \
--mount=target=/opt/praxis-mirror,from=praxis-mirror-source,readwrite <<EOF
--mount=target=/opt/praxis-mirror,from=praxis-mirror-source,readwrite <<EOF
bash -e
DwarKapex marked this conversation as resolved.
Show resolved Hide resolved
git config --global user.email "${GIT_USER_EMAIL}"
git config --global user.name "${GIT_USER_NAME}"

bash create-distribution.sh \
-p patchlist-paxml.txt \
-p ${PAXML_PATCHLIST} \
-m https://github.com/nvjax-svc-0/paxml.git \
-d $(dirname $(python -c "import paxml; print(*paxml.__path__)")) \
-d /opt/paxml \
-e /opt/pax-mirror
bash create-distribution.sh \
-p patchlist-praxis.txt \
-p ${PRAXIS_PATCHLIST} \
-m https://github.com/nvjax-svc-0/praxis.git \
-d $(dirname $(python -c "import praxis; print(*praxis.__path__)")) \
-d /opt/praxis \
-e /opt/praxis-mirror
rm -rf $(find /opt -name "__pycache__")
rm -rf $(find /opt -name "__pycache__") ~/.gitconfig
EOF

###############################################################################
### Install accumulated packages from the base image and the previous stage
################################################################################

FROM mealkit as final

RUN pip-finalize.sh
49 changes: 27 additions & 22 deletions rosetta/Dockerfile.t5x
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
ARG BASE_IMAGE=ghcr.io/nvidia/upstream-t5x:mealkit
ARG GIT_USER_EMAIL=jax@nvidia.com
ARG GIT_USER_NAME=NVIDIA
# These patchlist paths should be relative to this script
ARG T5X_PATCHLIST=patchlist-t5x.txt
ARG FLAX_PATCHLIST=patchlist-flax.txt

FROM scratch as rosetta-source
COPY . /
Expand All @@ -12,45 +15,47 @@ ADD --keep-git-dir=true https://github.com/google-research/t5x.git#main /
FROM scratch as flax-mirror-source
ADD --keep-git-dir=true https://github.com/google/flax.git#main /

FROM ${BASE_IMAGE} AS rosetta
###############################################################################
### Download source and add auxiliary scripts
################################################################################

FROM ${BASE_IMAGE} AS mealkit
ENV ENABLE_TE=1

ARG GIT_USER_EMAIL
ARG GIT_USER_NAME
RUN <<EOF bash -e
git config --global user.email "${GIT_USER_EMAIL}"
git config --global user.name "${GIT_USER_NAME}"
EOF
ARG T5X_PATCHLIST
ARG FLAX_PATCHLIST

COPY --from=rosetta-source / /opt/rosetta
WORKDIR /opt/rosetta
RUN --mount=target=/opt/t5x-mirror,from=t5x-mirror-source,readwrite \
--mount=target=/opt/flax-mirror,from=flax-mirror-source,readwrite <<EOF
--mount=target=/opt/flax-mirror,from=flax-mirror-source,readwrite <<EOF
bash -e
DwarKapex marked this conversation as resolved.
Show resolved Hide resolved
git config --global user.email "${GIT_USER_EMAIL}"
git config --global user.name "${GIT_USER_NAME}"
bash create-distribution.sh \
-p patchlist-t5x.txt \
-p ${T5X_PATCHLIST} \
-m https://github.com/nvjax-svc-0/t5x.git \
-d $(dirname $(python -c "import t5x; print(*t5x.__path__)")) \
-d /opt/t5x \
-e /opt/t5x-mirror
bash create-distribution.sh \
-p patchlist-flax.txt \
-p ${FLAX_PATCHLIST} \
-m https://github.com/nvjax-svc-0/flax.git \
-d $(dirname $(python -c "import flax; print(*flax.__path__)")) \
-d /opt/t5x \
DwarKapex marked this conversation as resolved.
Show resolved Hide resolved
-e /opt/flax-mirror
rm -rf $(find /opt -name "__pycache__")
rm -rf $(find /opt -name "__pycache__") ~/.gitconfig

echo "--extra-index-url https://developer.download.nvidia.com/compute/redist" >> /opt/pip-tools.d/manifest.t5x
echo "-e file:///opt/rosetta" >> /opt/pip-tools.d/manifest.t5x
EOF

WORKDIR /opt/rosetta
RUN <<EOF bash -e
pip install -e /opt/rosetta --extra-index-url https://developer.download.nvidia.com/compute/redist
rm -rf ~/.cache/pip/
EOF

ADD test-vit.sh /usr/local/bin
###############################################################################
### Install accumulated packages from the base image and the previous stage
################################################################################

FROM rosetta AS rosetta-devel
FROM mealkit as final

WORKDIR /opt/rosetta
RUN <<EOF bash -e
pip install -e '/opt/rosetta[test,lint]' --extra-index-url https://developer.download.nvidia.com/compute/redist
rm -rf ~/.cache/pip/
EOF
RUN pip-finalize.sh
Loading