Skip to content

Commit

Permalink
Merge pull request #198 from Tauffer-Consulting/dev
Browse files Browse the repository at this point in the history
Fix - GPU piece and rest basic repos
  • Loading branch information
vinicvaz authored Dec 4, 2023
2 parents 6f4ce44 + ee639c0 commit 1c54bdf
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 49 deletions.
55 changes: 34 additions & 21 deletions Dockerfile-domino-piece.gpu-dev
Original file line number Diff line number Diff line change
@@ -1,35 +1,48 @@
# TODO - THIS IS NOT TESTED YET
# consider using this: https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch
FROM nvidia/cuda:11.6.2-base-ubuntu20.04

# Installing Python with miniconda
RUN apt-get update && \
apt-get install -y build-essential && \
apt-get install -y wget && \
apt-get install -y git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN apt-get -y update && \
apt-get -y install python3 && \
apt-get -y install python3-pip && \
python3 -m pip install --upgrade pip

# Create folders to store source code
FROM nvidia/cuda:11.8.0-base-ubuntu22.04

ENV PYTHONUNBUFFERED=1

# SYSTEM
RUN apt-get update --yes --quiet && DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \
software-properties-common \
build-essential apt-utils \
&& rm -rf /var/lib/apt/lists/*

# Python
RUN add-apt-repository --yes ppa:deadsnakes/ppa && apt-get update --yes --quiet
RUN DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \
python3.10 \
python3.10-dev \
python3.10-distutils \
python3.10-lib2to3 \
python3.10-gdbm \
python3.10-tk \
pip

RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 999 \
&& update-alternatives --config python3

RUN ln -s /usr/bin/python3 /usr/bin/python

RUN pip install --upgrade pip


# Domino
## Create folders to store source code
RUN mkdir -p /home/domino/pieces_repository

# Create folder to store run data results
## Create folder to store run data results
RUN mkdir -p /home/run_data
WORKDIR /home/run_data
RUN chmod -R 777 .

# Create folder for sidecar pod mount to read xcom data
## Create folder for sidecar pod mount to read xcom data
RUN mkdir -p /airflow/xcom/
RUN echo "{}" > /airflow/xcom/return.json
WORKDIR /airflow/xcom
RUN chmod -R 777 .

# Editable pip install for Domino from local folder
## Editable pip install for Domino from local folder
RUN mkdir -p /home/domino/domino_py
COPY pyproject.toml /home/domino/domino_py/
COPY src/domino /home/domino/domino_py/src/domino
Expand Down
58 changes: 35 additions & 23 deletions Dockerfile-domino-piece.gpu-prod
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
# TODO - THIS IS NOT TESTED YET
# consider using this: https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch
FROM nvidia/cuda:11.6.2-base-ubuntu20.04

# Installing Python with miniconda
RUN apt-get update && \
apt-get install -y build-essential && \
apt-get install -y wget && \
apt-get install -y git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN apt-get -y update && \
apt-get -y install python3 && \
apt-get -y install python3-pip && \
python3 -m pip install --upgrade pip

# Create folders to store source code
FROM nvidia/cuda:11.8.0-base-ubuntu22.04

ENV PYTHONUNBUFFERED=1

# SYSTEM
RUN apt-get update --yes --quiet && DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \
software-properties-common \
build-essential apt-utils \
&& rm -rf /var/lib/apt/lists/*

# Python
RUN add-apt-repository --yes ppa:deadsnakes/ppa && apt-get update --yes --quiet
RUN DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \
python3.10 \
python3.10-dev \
python3.10-distutils \
python3.10-lib2to3 \
python3.10-gdbm \
python3.10-tk \
pip

RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 999 \
&& update-alternatives --config python3

RUN ln -s /usr/bin/python3 /usr/bin/python

RUN pip install --upgrade pip


# Domino
## Create folders to store source code
RUN mkdir -p /home/domino/pieces_repository

# Create folder to store run data results
## Create folder to store run data results
RUN mkdir -p /home/run_data
WORKDIR /home/run_data
RUN chmod -R 777 .

# Create folder for sidecar pod mount to read xcom data
## Create folder for sidecar pod mount to read xcom data
RUN mkdir -p /airflow/xcom/
RUN echo "{}" > /airflow/xcom/return.json
WORKDIR /airflow/xcom
RUN chmod -R 777 .

# pip install Domino from PyPI
RUN python3 -m pip install --upgrade pip \
pip install domino-py[cli]
## pip install Domino from PyPI
RUN pip install domino-py[cli]

WORKDIR /home
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ import ImageFilterWorkflow from "../../utils/workflows/image_filter_workflow.jso
import NasaImageWorkflow from "../../utils/workflows/nasa_workflow.json";
import RandomForestClassifierWorkflow from "../../utils/workflows/random_forest_pipeline.json";
import YoutubeSummarizerWorkflow from "../../utils/workflows/youtube_summarizer.json";
import YoutubeLocalTranscript from "../../utils/workflows/youtube_transcript_local.json";

interface WorkflowGalleryModalRef extends ModalRef {}

interface WorkflowGalleryModalProps {
confirmFn: (json: any) => void;
}

const USE_LOCAL_CARDS = true;
const USE_LOCAL_CARDS = false;

const localCardsContents = [
{
Expand Down Expand Up @@ -71,6 +72,13 @@ const localCardsContents = [
jsonFile: CloudSegmentationWorkflow,
levelTag: "Intermediate",
},
{
title: "Youtube Transcript Local Model",
description:
"A workflow that uses a local whisper model with GPU access transcript a youtube video. To use it you must use Shared Storage",
jsonFile: YoutubeLocalTranscript,
levelTag: "Advanced",
},
] as unknown as WorkflowsGalleryExamples;

const WorkflowExamplesGalleryModal = forwardRef(
Expand Down
Loading

0 comments on commit 1c54bdf

Please sign in to comment.