Skip to content
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

add nebari-workflow-controller #57

Merged
merged 7 commits into from
Apr 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/build-push-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- "dask-worker/*"
- "jupyterhub/*"
- "jupyterlab/*"
- "nebari-workflow-controller/*"

- "scripts/*"

Expand Down Expand Up @@ -52,9 +53,11 @@ jobs:
- gpu
- cpu
exclude:
# excludes JupyterHub/GPU
# excludes JupyterHub/GPU, Workflow Controller/GPU
- dockerfile: jupyterhub
platform: gpu
- dockerfile: workflow-controller
platform: gpu

steps:
- name: "Checkout Repository 🛎️"
Expand Down
60 changes: 60 additions & 0 deletions Dockerfile.workflow-controller
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright (c) Nebari Development Team.
# 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.workflow-controller -t nebari-workflow-controller:latest .

ARG BASE_IMAGE=ubuntu:20.04
FROM $BASE_IMAGE
LABEL MAINTAINER="Nebari development team"

ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
RUN chmod -R a-w ~
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_SHA256 412b79330e90e49cf7e39a7b6f4752970fcdb8eb54b1a45cc91afe6777e8518c
SHELL ["/bin/bash", "-c"]
ENV CONDA_DIR=/opt/conda \
DEFAULT_ENV=default
# Set timezone
ENV TZ=America/Chicago
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# Set PATH for Dockerfile so that conda works and some useful scripts are
# available. Any changes intended to propagate to runtime containers should be
# set in /etc/profile.d (see setup_shell_behavior.sh)
ENV PATH=/opt/conda/envs/${DEFAULT_ENV}/bin:/opt/conda/bin:${PATH}:/opt/scripts

# ============= base install ===============
# install conda
COPY scripts/install-conda.sh /opt/scripts/install-conda.sh
RUN echo "${SHELL}"; env; cat ~/.bashrc; cat ~/.profile ; /opt/scripts/install-conda.sh

# ========== nebari-workflow-controller install ============
COPY scripts/install-apt.sh /opt/scripts/install-apt.sh
COPY nebari-workflow-controller/apt.txt /opt/nebari-workflow-controller/apt.txt
RUN /opt/scripts/install-apt.sh

# uncomment to install dev dependencies
# RUN /opt/scripts/install-apt.sh /opt/nebari-workflow-controller/apt.txt

ARG SKIP_CONDA_SOLVE=no
COPY scripts/install-conda-environment.sh /opt/scripts/install-conda-environment.sh
COPY nebari-workflow-controller/environment.yaml /opt/nebari-workflow-controller/environment.yaml
RUN \
if [ "${SKIP_CONDA_SOLVE}" != "no" ];then \
ENV_FILE=/opt/nebari-workflow-controller/conda-linux-64.lock ; \
else \
ENV_FILE=/opt/nebari-workflow-controller/environment.yaml ; \
fi ; \
/opt/scripts/install-conda-environment.sh "${ENV_FILE}" 'true'

COPY nebari-workflow-controller /opt/nebari-workflow-controller

CMD ["python", "-m", "nebari_workflow_controller"]
26 changes: 26 additions & 0 deletions nebari-workflow-controller/apt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (c) Nebari Development Team.
# Distributed under the terms of the Modified BSD License.

locales

# assign uid/gid names
libnss-wrapper

# utilities
wget
curl
htop
tree
zip
unzip

# development utilities
git
openssh-client
tmux
xvfb

# editors
nano
vim
emacs
8 changes: 8 additions & 0 deletions nebari-workflow-controller/environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: default
channels:
- conda-forge
dependencies:
- python=3.10
- pip
- pip:
- nebari-workflow-controller