-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhancement : Moved Docker images repo to docker folder in main branch #2932
Open
Helion55
wants to merge
9
commits into
nebari-dev:main
Choose a base branch
from
Helion55:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5f751d3
Dockerfiles added
Helion55 48bcb2d
workflow updated for docker setup
Helion55 d5c0387
added documention and rfd from docker repo
Helion55 6bda9fd
Update .pre-commit-config.yaml from docker repo
Helion55 c9710cb
Merge branch 'main' into main
dcmcand a94a2c2
Added Readme.md from the docker repository
Helion55 9d3fe5d
Merge branch 'main' into main
Helion55 99fe60a
Update install-conda-environment.sh
Helion55 3251349
Merge branch 'main' into main
dcmcand File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
name: "Request for Discussion (RFD) 💬" | ||
about: Open discussion about a feature or design project in Nebari. | ||
labels: | ||
- "type: RFD" | ||
title: "RFD - Title" | ||
--- | ||
|
||
<!-- Example of when and how to create a RFD or RFC (request for comments) --> | ||
<!-- https://gitpod.notion.site/Decision-Making-RFCs-eb4a57f3a34f40f1afbd95e05322af70 --> | ||
|
||
<!-- Use this guide to set the status: Draft 🚧 / Open for comments 💬/ Accepted ✅ /Implemented 🚀/ Obsolete 🗃 --> | ||
|
||
| Status | Draft 🚧 / Open for comments 💬/ Accepted ✅ /Implemented 🚀/ Obsolete 🗃 | | ||
| ----------------- | ------------------------------------------------------------------------ | | ||
| Author(s) | GitHub handle | | ||
| Date Created | dd-MM-YYY | | ||
| Date Last updated | dd-MM-YYY | | ||
| Decision deadline | dd-MM-YYY | | ||
|
||
# Title | ||
|
||
## Summary | ||
|
||
<!-- What are we trying to solve here? Try and make this concise--> | ||
|
||
## User benefit | ||
|
||
<!-- How will users (or other contributors) benefit from this work? What would be the headline in the release notes or blog post? --> | ||
|
||
## Design Proposal | ||
|
||
<!--This is the meat of the document, where you explain your proposal. | ||
|
||
Explain the design in enough detail for somebody familiar with the project to understand. Include examples of how the feature/implementation will work. Feel free to add schematics, drawings or other supporting visual material. --> | ||
|
||
### Alternatives or approaches considered (if any) | ||
|
||
<!-- Make sure to discuss the relative merits of alternatives to your proposal. --> | ||
|
||
### Best practices | ||
|
||
<!-- Does this proposal change best practices for some aspect of using/developing JupyterLab or other project? How will these changes be communicated/enforced? | ||
--> | ||
|
||
### User impact | ||
|
||
<!-- What are the user-facing changes? How will this feature be rolled out? --> | ||
|
||
## Unresolved questions | ||
|
||
<!-- Seed this with open questions you require feedback on from the RFD process. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: "Documentation 📖" | ||
description: Did you find an error in our documentation? Report your findings here. | ||
title: "[DOC] - <title>" | ||
labels: ["area: documentation 📖"] | ||
|
||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
# Welcome 👋 | ||
|
||
Thanks for using Nebari and taking some time to contribute to this project. | ||
|
||
Please fill out each section below. This info allows Nebari maintainers to diagnose (and fix!) your issue as | ||
quickly as possible. | ||
Before submitting a bug, please make sure the issue hasn't been already addressed by searching through | ||
[the past issues](https://github.com/nebari-dev/nebari-docs/issues). | ||
|
||
Useful links: | ||
|
||
- Documentation: https://www.nebari.dev | ||
- Contribution guidelines: https://www.nebari.dev/community/ | ||
|
||
- type: checkboxes | ||
attributes: | ||
label: Preliminary Checks | ||
description: Please make sure that you verify each checkbox and follow the instructions for them. | ||
options: | ||
- label: "This issue is not a question, feature request, RFC, or anything other than a bug report. Please post those things in GitHub Discussions: https://github.com/nebari-dev/nebari/discussions" | ||
required: true | ||
- type: textarea | ||
validations: | ||
required: true | ||
attributes: | ||
label: Summary | ||
description: | | ||
What problem(s) did you run into that caused you to request a fix to the documentation or additional | ||
documentation? What questions do you think we should answer? | ||
|
||
- type: textarea | ||
validations: | ||
required: true | ||
attributes: | ||
label: Steps to Resolve this Issue | ||
description: | | ||
How can the problem be solved? Are there any additional steps required? Do any other pages need to be updated? | ||
value: | | ||
1. | ||
2. | ||
3. | ||
... | ||
|
||
- type: markdown | ||
attributes: | ||
value: > | ||
Thanks for contributing 🎉! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# Build and push images to: | ||
# GitHub Container Registry (ghcr.io) | ||
# Red Hat Container Registry (quay.io) | ||
name: "Build Docker Images" | ||
|
||
on: | ||
workflow_dispatch: null | ||
push: | ||
branches: | ||
- "*" | ||
paths: | ||
- "docker/Dockerfile.*" | ||
- "docker/dask-worker/*" | ||
- "docker/jupyterhub/*" | ||
- "docker/jupyterlab/*" | ||
- "docker/nebari-workflow-controller/*" | ||
|
||
- "docker/scripts/*" | ||
|
||
- ".github/workflows/build-push-docker.yaml" | ||
tags: | ||
- "*" | ||
|
||
env: | ||
DOCKER_ORG: nebari | ||
GPU_BASE_IMAGE: nvidia/cuda:12.2.2-base-ubuntu20.04 | ||
GPU_IMAGE_SUFFIX: gpu | ||
BASE_IMAGE: ubuntu:20.04 | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
security-events: write | ||
|
||
# https://docs.github.com/en/actions/using-jobs/using-concurrency | ||
concurrency: | ||
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-images: | ||
name: "Build Docker Images" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
dockerfile: | ||
- jupyterlab | ||
- jupyterhub | ||
- dask-worker | ||
- workflow-controller | ||
platform: | ||
- gpu | ||
- cpu | ||
exclude: | ||
# excludes JupyterHub/GPU, Workflow Controller/GPU | ||
- dockerfile: jupyterhub | ||
platform: gpu | ||
- dockerfile: workflow-controller | ||
platform: gpu | ||
|
||
steps: | ||
- name: "Checkout Repository 🛎️" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Set up Docker Buildx 🛠️" | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: "Login to GitHub Container Registry 🔐" | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.BOT_GHCR_TOKEN }} | ||
|
||
- name: "Login to Quay Container Registry 🔐" | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_TOKEN }} | ||
|
||
- name: "Set BASE_IMAGE and Image Suffix 📷" | ||
if: ${{ matrix.platform == 'gpu' }} | ||
run: | | ||
echo "GPU Platform Matrix" | ||
echo "BASE_IMAGE=$GPU_BASE_IMAGE" >> $GITHUB_ENV | ||
echo "IMAGE_SUFFIX=-$GPU_IMAGE_SUFFIX" >> $GITHUB_ENV | ||
|
||
- name: "Generate Docker images tags 🏷️" | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
"quay.io/${{ env.DOCKER_ORG }}/nebari-${{ matrix.dockerfile }}${{ env.IMAGE_SUFFIX }}" | ||
"ghcr.io/${{ github.repository_owner }}/nebari-${{ matrix.dockerfile }}${{ env.IMAGE_SUFFIX }}" | ||
tags: | | ||
# branch event -> e.g. `main-f0f6994-20221001` | ||
type=ref, event=branch, suffix=-{{sha}}-{{date 'YYYYMMDD'}} | ||
# needed for integration tests | ||
type=ref, event=branch | ||
# on tag push -> e.g. `2022.10.1` | ||
type=ref, event=tag | ||
|
||
- name: "Inspect image dir tree 🔍" | ||
run: | | ||
sudo apt-get install tree | ||
tree . | ||
|
||
- name: "Build docker images 🐳" | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: "Dockerfile.${{ matrix.dockerfile }}" | ||
tags: ${{ steps.meta.outputs.tags }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
build-args: BASE_IMAGE=${{ env.BASE_IMAGE }} | ||
platforms: linux/amd64,linux/arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Test Docker images | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "docker/Dockerfile.*" | ||
|
||
- "docker/dask-worker/*" | ||
- "docker/jupyterhub/*" | ||
- "docker/jupyterlab/*" | ||
|
||
- "docker/scripts/*" | ||
|
||
- ".github/workflows/build-push-docker.yaml" | ||
- ".github/workflows/test-images.yaml" | ||
|
||
env: | ||
DOCKER_ORG: nebari | ||
GITHUB_SHA: ${{ github.sha }} | ||
GPU_BASE_IMAGE: nvidia/cuda:12.2.2-base-ubuntu20.04 | ||
GPU_IMAGE_SUFFIX: gpu | ||
BASE_IMAGE: ubuntu:20.04 | ||
|
||
# https://docs.github.com/en/actions/using-jobs/using-concurrency | ||
concurrency: | ||
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-test-images: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
dockerfile: | ||
- jupyterlab | ||
- jupyterhub | ||
- dask-worker | ||
platform: | ||
- gpu | ||
- cpu | ||
exclude: | ||
# excludes JupyterHub/GPU | ||
- dockerfile: jupyterhub | ||
platform: gpu | ||
steps: | ||
- name: Checkout Repository 🛎 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Lint Dockerfiles 🔍 | ||
uses: jbergstroem/hadolint-gh-action@v1 | ||
with: | ||
dockerfile: Dockerfile.${{ matrix.dockerfile }} | ||
output_format: tty | ||
error_level: 0 | ||
|
||
- name: "Set BASE_IMAGE and Image Suffix 📷" | ||
if: ${{ matrix.platform == 'gpu' }} | ||
run: | | ||
echo "GPU Platform Matrix" | ||
echo "BASE_IMAGE=$GPU_BASE_IMAGE" >> $GITHUB_ENV | ||
echo "IMAGE_SUFFIX=-$GPU_IMAGE_SUFFIX" >> $GITHUB_ENV | ||
|
||
- name: Build Image 🛠 | ||
run: | | ||
docker build -t ${DOCKER_ORG}/${{ matrix.dockerfile }}${{ env.IMAGE_SUFFIX }}:${{ env.GITHUB_SHA }} \ | ||
--build-arg BASE_IMAGE=$BASE_IMAGE \ | ||
-f Dockerfile.${{ matrix.dockerfile }} . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (c) Nebari Development Team. | ||
Check notice Code scanning / Trivy No HEALTHCHECK defined Low
Artifact: docker/Dockerfile.dask-worker
Type: dockerfile Vulnerability DS026 Severity: LOW Message: Add HEALTHCHECK instruction in your Dockerfile Link: DS026 |
||
# Distributed under the terms of the Modified BSD License. | ||
# Usage: | ||
# ------ | ||
# | ||
# To make a local build of the container, from the root directory: | ||
# docker build -f Dockerfile.dask-worker -t nebari-dask-worker:latest . | ||
|
||
ARG BASE_IMAGE=ubuntu:20.04 | ||
FROM $BASE_IMAGE | ||
LABEL MAINTAINER="Nebari development team" | ||
|
||
COPY scripts/install-apt-minimal.sh /opt/scripts/install-apt-minimal.sh | ||
RUN /opt/scripts/install-apt-minimal.sh | ||
|
||
COPY scripts/fix-permissions /opt/scripts/fix-permissions | ||
|
||
ENV MAMBAFORGE_VERSION 4.13.0-1 | ||
ENV MAMBAFORGE_AARCH64_SHA256 69e3c90092f61916da7add745474e15317ed0dc6d48bfe4e4c90f359ba141d23 | ||
ENV MAMBAFORGE_X86_64_SHA256 412b79330e90e49cf7e39a7b6f4752970fcdb8eb54b1a45cc91afe6777e8518c | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
ENV PATH=/opt/conda/bin:${PATH}:/opt/scripts | ||
|
||
# ============== base install =============== | ||
COPY scripts/install-conda.sh /opt/scripts/install-conda.sh | ||
|
||
RUN /opt/scripts/install-conda.sh | ||
|
||
# ========== dask-worker install =========== | ||
COPY dask-worker/environment.yaml /opt/dask-worker/environment.yaml | ||
COPY scripts/install-conda-environment.sh /opt/scripts/install-conda-environment.sh | ||
RUN /opt/scripts/install-conda-environment.sh /opt/dask-worker/environment.yaml 'false' | ||
|
||
# ========== Setup GPU Paths ============ | ||
ENV LD_LIBRARY_PATH=/usr/local/nvidia/lib64 | ||
ENV NVIDIA_PATH=/usr/local/nvidia/bin | ||
ENV PATH="$NVIDIA_PATH:$PATH" | ||
|
||
COPY dask-worker /opt/dask-worker | ||
RUN /opt/dask-worker/postBuild |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check failure
Code scanning / Trivy
Image user should not be 'root' High