You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to avoid installing dependencies directly onto the machine, a Dockerized version of the Clay model has been provided. To run it using [docker compose](https://docs.docker.com/compose/) run the following command from the repo root:
105
83
```bash
106
84
pip install -U jupyter-book
107
85
```
108
86
109
87
Then build it with:
110
-
Alternatively, you can build and run the Docker image using docker directly with:
111
88
```bash
112
89
jupyter-book build docs/
113
90
```
114
91
115
92
You can preview the site locally with:
116
-
In both cases, the default command will be run, which instantiates a [jupyter-lab](https://jupyterlab.readthedocs.io/en/stable/getting_started/starting.html) instance, from which the documentation notebooks can be run. The jupyter notebook will be accssible on the exposed port (`8888`).
117
-
### Note: accessing the jupyter-lab instance in the browser requires an authentication token that can be found in the container logs. Look for the following lines:
118
93
```bash
119
94
python -m http.server --directory _build/html
120
95
```
121
96
122
97
There is a GitHub Action on `./github/workflows/deploy-docs.yml` that builds the site and pushes it to GitHub Pages.
98
+
99
+
## Docker
100
+
101
+
In order to avoid installing dependencies directly onto the machine, a Dockerized version of the Clay model has been provided. To run it using [docker compose](https://docs.docker.com/compose/) run the following command from the repo root:
102
+
```bash
103
+
docker-compose up # using the --build flag to force a rebuild, if necessary
104
+
```
105
+
106
+
Alternatively, you can build and run the Docker image using docker directly with:
docker run --rm -it -v $(pwd):/model -p 8888:8888 -e ENV_NAME=claymodel --platform linux/amd64 claymodel:latest # run container
110
+
```
111
+
112
+
In both cases, the default command will be run, which instantiates a [jupyter-lab](https://jupyterlab.readthedocs.io/en/stable/getting_started/starting.html) instance, from which the documentation notebooks can be run. The jupyter notebook will be accssible on the exposed port (`8888`).
113
+
### Note: accessing the jupyter-lab instance in the browser requires an authentication token that can be found in the container logs. Look for the following lines:
114
+
```bash
115
+
model-claymodel-1 |
116
+
model-claymodel-1 | To access the server, open this file in a browser:
Additionally the project root will be mounted as volume to the running container so any modifications made to the code base locally will be immediately reflected within the docker container.
For example, the `bash` command can be used to access an interactive bash session within the running docker container, with the `micromamba` environment already activated:
137
-
(with docker-compose)
138
136
For example, the `bash` command can be used to access an interactive bash session within the running docker container, with the `micromamba` environment already activated:
0 commit comments