This README provides instructions on how to use the manylinux.Dockerfile
to run sbt and perform a release.
First, you need to build the Docker image from the manylinux.Dockerfile:
docker build -t jslllama:latest -f manylinux.Dockerfile .The entrypoint is sbt_publish.sh. Which runs the compilation
and release. The first argument are the flags to sbt. When no argument is
given, release for cpu is assumed.
We need to prepare the four following environment variables (see sbt-ci-release for more details):
PGP_SECRET: The base64-encoded GPG secret key.- We can export the secret key with
gpg --export-secret-keys $LONG_ID | base64 -w0, where$LONG_IDis the - long id of the gpg key.
- We can export the secret key with
PGP_PASSPHRASE: The passphrase for the GPG key.- Passphrase you use to unlock your GPG key.
SONATYPE_USERNAME: The username/token for Sonatype.SONATYPE_PASSWORD: The password/token for Sonatype.
To perform a release, we need to run the docker container with sbt secrets and the corresponding pgp key:
docker run \
-e PGP_PASSPHRASE="$PGP_PASSPHRASE" \
-e PGP_SECRET="$PGP_SECRET" \
-e SONATYPE_USERNAME="$SONATYPE_USERNAME" \
-e SONATYPE_PASSWORD="$SONATYPE_PASSWORD" \
jslllama:latestThis command runs sbt release in the Docker container, which performs a release of
your sbt project.
For the GPU release, we need to use the manylinux-gpu.Dockerfile:
docker build -t jslllama:gpu -f docker/manylinux-gpu.Dockerfile .Then, wen running docker run, we need to specify it to use gpus:
docker run \
-e PGP_PASSPHRASE="$PGP_PASSPHRASE" \
-e PGP_SECRET="$PGP_SECRET" \
-e SONATYPE_USERNAME="$SONATYPE_USERNAME" \
-e SONATYPE_PASSWORD="$SONATYPE_PASSWORD" \
--gpus all \
jslllama:gpuFor M1:
docker run $ENV_VARS jslllama:latest -Dis_m1=trueFor AARCH64:
docker run $ENV_VARS jslllama:latest -Dis_aarch64=true