diff --git a/.github/workflows/build-containers-test.yaml b/.github/workflows/build-containers-test.yaml index 627c9da37..853002af6 100644 --- a/.github/workflows/build-containers-test.yaml +++ b/.github/workflows/build-containers-test.yaml @@ -16,7 +16,6 @@ jobs: matrix: dockerfile: - Dockerfile-ray-node - - Dockerfile-notebook - repository/Dockerfile - gateway/Dockerfile python: diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index d15029a91..4ac02badc 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -3,23 +3,32 @@ name: Docker notebook tests on: pull_request: branches: [ main ] - + jobs: tests: runs-on: ubuntu-latest timeout-minutes: 45 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build the containers - run: docker compose -f docker-compose-dev.yaml --profile jupyter build + run: docker compose -f docker-compose-dev.yaml build - name: Run the jupyter profile - run: docker compose -f docker-compose-dev.yaml --profile jupyter up -d + run: docker compose -f docker-compose-dev.yaml up -d - name: Give containers time to initialize shell: bash run: sleep 90 - - name: Test notebooks in the docker environment + - uses: actions/setup-python@v5 + with: + python-version: '3.9' + - name: install dependencies + shell: bash + run: pip install client/ && pip install nbmake pytest + - name: Run basic notebooks + shell: bash + run: pytest --nbmake docs/getting_started/basic/ + - name: Run experimental notebooks shell: bash - run: docker exec qs-jupyter "bash" "-c" "pip install nbmake pytest && pytest --nbmake --ignore=/home/jovyan/serverless/guides/07_working_with_datasets.ipynb /home/jovyan/serverless/" + run: pytest --nbmake docs/getting_started/experimental/ - name: Dump logs on failure if: ${{ failure() }} run: | diff --git a/Dockerfile-notebook b/Dockerfile-notebook deleted file mode 100644 index deea2ad33..000000000 --- a/Dockerfile-notebook +++ /dev/null @@ -1,32 +0,0 @@ -ARG IMAGE_PY_VERSION=3.9 -FROM jupyter/base-notebook:python-$IMAGE_PY_VERSION - -USER 0 -RUN apt-get -y update &&\ - apt-get install --no-install-recommends -y \ - gcc=4:11.2.0-1ubuntu1 \ - build-essential=12.9ubuntu3 \ - libopenblas-dev=0.3.20+ds-1 &&\ - apt-get clean &&\ - rm -rf /var/lib/apt/lists/* - -WORKDIR / -USER $NB_UID -COPY --chown=$NB_UID:$NB_UID ./client ./qs - -WORKDIR /qs -RUN pip install --upgrade pip &&\ - pip install . --no-cache-dir &&\ - pip install --no-cache-dir -r requirements-notebook.txt - -WORKDIR / -USER 0 -RUN rm -r ./qs - -WORKDIR /home/$NB_USER -USER $NB_UID -COPY --chown=$NB_UID:$NB_UID ./docs/getting_started/basic/ ./serverless/getting_started/basic/ -COPY --chown=$NB_UID:$NB_UID ./docs/getting_started/experimental/ ./serverless/getting_started/experimental/ -COPY --chown=$NB_UID:$NB_UID ./docs/examples/ ./serverless/examples/ - -ENV JUPYTER_ENABLE_LAB=no diff --git a/docker-compose-dev.yaml b/docker-compose-dev.yaml index cfc0a54c5..40a137596 100644 --- a/docker-compose-dev.yaml +++ b/docker-compose-dev.yaml @@ -1,18 +1,5 @@ # compose config for running images based on local files services: - jupyter: - container_name: qs-jupyter - build: - context: ./ - dockerfile: Dockerfile-notebook - profiles: ["jupyter", "full"] - ports: - - 8888:8888 - environment: - - JUPYTER_TOKEN=123 - - GATEWAY_HOST=http://gateway:8000 - networks: - - safe-tier ray-head: container_name: ray-head build: