From 67a747dc3facc91daba3fb9a8457f8aa0a850311 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 18 Jul 2024 16:37:13 -0500 Subject: [PATCH] resolve warnings about casing in Dockerfiles (#688) I've been seeing this build warning in logs here: ```text 2 warnings found (use --debug to expand): - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 37) - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 70) ``` ([example build link](https://github.com/rapidsai/docker/actions/runs/9773984230/job/26981297565#step:9:826)) That comes from BuildKit's build checks (https://docs.docker.com/reference/build-checks/). Details on that specific warning: https://docs.docker.com/reference/build-checks/from-as-casing/. This fixes it, to remove a source of noise in logs (and because I agree with the suggestion that capitalizing keywords approves readability a bit). Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Kyle Edwards (https://github.com/KyleFromNVIDIA) URL: https://github.com/rapidsai/docker/pull/688 --- Dockerfile | 4 ++-- context/test_notebooks.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a0bc1905..8b68b5cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,7 @@ EOF # Base image -FROM rapidsai/miniforge-cuda:cuda${CUDA_VER}-base-${LINUX_VER}-py${PYTHON_VER} as base +FROM rapidsai/miniforge-cuda:cuda${CUDA_VER}-base-${LINUX_VER}-py${PYTHON_VER} AS base ARG CUDA_VER ARG PYTHON_VER @@ -67,7 +67,7 @@ CMD ["ipython"] # Notebooks image -FROM base as notebooks +FROM base AS notebooks ARG CUDA_VER ARG LINUX_DISTRO diff --git a/context/test_notebooks.py b/context/test_notebooks.py index 7b3084fb..7f987009 100755 --- a/context/test_notebooks.py +++ b/context/test_notebooks.py @@ -70,6 +70,7 @@ def test_notebook(notebook_file, executed_nb_file): warnings = [] outputs = [] + # use nbconvert to run the notebook natively ep = ExecutePreprocessor(timeout=600, kernel_name="python3", allow_errors=True) task_init = timeit.default_timer()