Skip to content

Commit

Permalink
Remove service container
Browse files Browse the repository at this point in the history
  • Loading branch information
garryod committed Feb 15, 2023
1 parent 51543f1 commit 9231d65
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@
// make the workspace folder the same inside and outside of the container
"workspaceMount": "source=${localWorkspaceFolder},target=${localWorkspaceFolder},type=bind",
"workspaceFolder": "${localWorkspaceFolder}",
"postCreateCommand": "pip install -e .[interactive,processing,service]"
"postCreateCommand": "pip install -e .[interactive,processing]"
}
2 changes: 1 addition & 1 deletion .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: true
matrix:
target: ["interactive", "processing", "service"]
target: ["interactive", "processing"]

runs-on: ubuntu-latest

Expand Down
15 changes: 0 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,3 @@ RUN pip install --upgrade .[processing]
VOLUME /inputs /outputs

ENTRYPOINT ["papermill", "notebook.ipynb", "/outputs/notebook.ipynb", "--parameters", "OUTPUT_PREFIX", "/outputs", "--parameters", "INPUT_PREFIX", "/inputs"]

FROM python:${PYTHON_VERSION}-slim as service

ENV WORKDIR=/environment
WORKDIR ${WORKDIR}

COPY . ${WORKDIR}

RUN pip install --upgrade .[service]

ENV NOTEBOOK_PATH="notebook.ipynb"

EXPOSE 8000

ENTRYPOINT ["papermill_service"]
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Bookshelf Notebooks

This template can be used to develop container images with data processing notebooks which will be automatically deployed in three varieties:
This template can be used to develop container images with data processing notebooks which will be automatically deployed in two varieties:

1. An interactive - jupyterlab - environment, for running both locally and on the hosted JupyterLab instance
2. A headless processing image, for running both locally and as a cluster job
3. A service, which can be hosted on the k8s cluster, and accessed via a REST API

## Setting up your bookshelf

Expand Down Expand Up @@ -47,9 +46,3 @@ or
module load bookshelf/bookshelf-template/latest
bookshelf-template-processing
```

### Service (local)

```
podman run --publish 8000:8000 ghcr.io/diamondlightsource/bookshelf-template/service:latest
```
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ dynamic = ["version"]
[project.optional-dependencies]
interactive = ["jupyterlab"]
processing = ["ipykernel", "black", "papermill"]
service = ["ipykernel", "black", "papermill_service"]

0 comments on commit 9231d65

Please sign in to comment.