Skip to content

Commit eb72040

Browse files
authored
Use Colab CPU base image. (#1534)
* Remove the config.txt file. We only set the BASE_IMAGE now, move that to the Dockerfile.tmpl for simplicity. http://b/479244898
1 parent 42bf08d commit eb72040

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

Dockerfile.tmpl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
ARG BASE_IMAGE \
2-
BASE_IMAGE_TAG
3-
4-
FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG}
1+
{{ if eq .Accelerator "gpu" }}
2+
FROM us-docker.pkg.dev/colab-images/public/runtime:release-colab-external_20260126-060048_RC00
3+
{{ else }}
4+
FROM us-docker.pkg.dev/colab-images/public/cpu-runtime:release-colab-external_20260123-060023_RC00
5+
{{ end}}
56

67
ADD kaggle_requirements.txt /kaggle_requirements.txt
78

build

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,13 @@ done
4747
BUILD_ARGS+=" --build-arg GIT_COMMIT=$(git rev-parse HEAD)"
4848
BUILD_ARGS+=" --build-arg BUILD_DATE=$(date '+%Y%m%d-%H%M%S')"
4949

50-
# Read build args from config.txt file.
51-
SRCDIR=$(dirname "${BASH_SOURCE[0]}")
52-
for l in `cat ${SRCDIR}/config.txt`; do
53-
BUILD_ARGS+=" --build-arg $l"
54-
done
55-
5650
readonly CACHE_FLAG
5751
readonly DOCKERFILE
5852
readonly ACCELERATOR
5953
readonly IMAGE_TAG
6054
readonly BUILD_ARGS
6155

56+
SRCDIR=$(dirname "${BASH_SOURCE[0]}")
6257
DOCKERFILE_OUTDIR="${SRCDIR}/.generated"
6358
mkdir -p $DOCKERFILE_OUTDIR
6459
DOCKERFILE_PATH="$DOCKERFILE_OUTDIR/$DOCKERFILE"

config.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)