From 9c20b4df3132a0951273bee741b9581832a838cc Mon Sep 17 00:00:00 2001 From: Don Setiawan Date: Thu, 9 May 2024 15:11:54 -0700 Subject: [PATCH] refactor: Update base-ssec-project to use base-image (#10) --- base-ssec-project/Dockerfile | 26 ++++++-------------------- base-ssec-project/apt.txt | 4 ++++ base-ssec-project/environment.yml | 2 +- base-ssec-project/postBuild.sh | 0 base-ssec-project/start | 9 +++++++++ 5 files changed, 20 insertions(+), 21 deletions(-) create mode 100644 base-ssec-project/apt.txt delete mode 100644 base-ssec-project/postBuild.sh create mode 100755 base-ssec-project/start diff --git a/base-ssec-project/Dockerfile b/base-ssec-project/Dockerfile index 10f47da..b4ec784 100644 --- a/base-ssec-project/Dockerfile +++ b/base-ssec-project/Dockerfile @@ -1,20 +1,6 @@ -# Use the latest version of the pangeo/base-notebook (includes CUDA support) -FROM pangeo/base-notebook:latest - -# Set the user to root -USER root - -# Copy the environment file into the Docker image -COPY environment.yml /tmp/environment.yml - -# Create a new Conda environment from the environment.yml file -RUN conda env create -f /tmp/environment.yml - -# Install wget, git, ncdu, and curl -RUN apt-get update && apt-get install -y \ - wget \ - git \ - ncdu \ - curl \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* \ No newline at end of file +# ONBUILD instructions in base-image/Dockerfile are used to +# perform certain actions based on the presence of specific +# files (such as conda-linux-64.lock, start) in this repo. +# Refer to the base-image/Dockerfile for documentation. +ARG SSEC_BASE_IMAGE_TAG=latest +FROM ghcr.io/uw-ssec/base-image:${SSEC_BASE_IMAGE_TAG} diff --git a/base-ssec-project/apt.txt b/base-ssec-project/apt.txt new file mode 100644 index 0000000..e05f0fe --- /dev/null +++ b/base-ssec-project/apt.txt @@ -0,0 +1,4 @@ +wget +git +ncdu +curl diff --git a/base-ssec-project/environment.yml b/base-ssec-project/environment.yml index f8d8c40..3bfb547 100644 --- a/base-ssec-project/environment.yml +++ b/base-ssec-project/environment.yml @@ -15,4 +15,4 @@ dependencies: - matplotlib - pydantic - conda-lock - - pip \ No newline at end of file + - pip diff --git a/base-ssec-project/postBuild.sh b/base-ssec-project/postBuild.sh deleted file mode 100644 index e69de29..0000000 diff --git a/base-ssec-project/start b/base-ssec-project/start new file mode 100755 index 0000000..1db06ca --- /dev/null +++ b/base-ssec-project/start @@ -0,0 +1,9 @@ +#!/bin/bash -l + +# ==== ONLY EDIT WITHIN THIS BLOCK ===== + + + +# ==== ONLY EDIT WITHIN THIS BLOCK ===== + +exec "$@" \ No newline at end of file