Skip to content

Commit

Permalink
Merge pull request #266 from google:mohit/fix_docker_build
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 584058470
  • Loading branch information
maxtex authors committed Nov 20, 2023
2 parents da44730 + 66f4649 commit 7a09b47
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docker_build_dependency_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ fi
if [[ -z ${LIBTPU_GCS_PATH+x} ]] ; then
export LIBTPU_GCS_PATH=NONE
echo "Default LIBTPU_GCS_PATH=${LIBTPU_GCS_PATH}"
docker build --build-arg MODE=${MODE} --build-arg JAX_VERSION=$JAX_VERSION --build-arg LIBTPU_GCS_PATH=$LIBTPU_GCS_PATH -f ./maxtext_dependencies.Dockerfile -t ${LOCAL_IMAGE_NAME} .
docker build --network host --build-arg MODE=${MODE} --build-arg JAX_VERSION=$JAX_VERSION --build-arg LIBTPU_GCS_PATH=$LIBTPU_GCS_PATH -f ./maxtext_dependencies.Dockerfile -t ${LOCAL_IMAGE_NAME} .
else
docker build --build-arg MODE=${MODE} --build-arg JAX_VERSION=$JAX_VERSION --build-arg LIBTPU_GCS_PATH=$LIBTPU_GCS_PATH -f ./maxtext_dependencies.Dockerfile -t ${LOCAL_IMAGE_NAME} .
docker build --build-arg CUSTOM_LIBTPU=true -f ./maxtext_libtpu_path.Dockerfile -t ${LOCAL_IMAGE_NAME} .
docker build --network host --build-arg MODE=${MODE} --build-arg JAX_VERSION=$JAX_VERSION --build-arg LIBTPU_GCS_PATH=$LIBTPU_GCS_PATH -f ./maxtext_dependencies.Dockerfile -t ${LOCAL_IMAGE_NAME} .
docker build --network host --build-arg CUSTOM_LIBTPU=true -f ./maxtext_libtpu_path.Dockerfile -t ${LOCAL_IMAGE_NAME} .
fi

echo ""
Expand All @@ -61,8 +61,8 @@ echo ""
echo "Built your base docker image and named it ${LOCAL_IMAGE_NAME}.
It only has the dependencies installed. Assuming you're on a TPUVM, to run the
docker image locally and mirror your local working directory run:"
echo "docker run -v $(pwd):/app --rm -it --privileged --entrypoint bash maxtext_base_image"
echo "docker run -v $(pwd):/app --rm -it --privileged --entrypoint bash ${LOCAL_IMAGE_NAME}"
echo ""
echo "You can run MaxText and your development tests inside of the docker image. Changes to your workspace will automatically
be reflected inside the docker container."
echo "Once you want you upload your docker container to GCR, take a look at docker_upload_runner.sh"
echo "Once you want you upload your docker container to GCR, take a look at docker_upload_runner.sh"

0 comments on commit 7a09b47

Please sign in to comment.