Skip to content

Commit 8c06006

Browse files
committed
Reorder README
1 parent 531cfd0 commit 8c06006

File tree

1 file changed

+50
-50
lines changed

1 file changed

+50
-50
lines changed

README.md

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -30,49 +30,7 @@ Multi-architecture (linux/amd64 + linux/arm64) Jupyter environment with both Pyt
3030
| Token control | Defaults to random, options to set a reusable token via `-e JUPYTER_TOKEN=yourtoken` or disable via `-e JUPYTER_DISABLE_TOKEN=1`|
3131
| Persistent user installs | Python & R packages installed in the notebook via `!pip install` / `install.packages()` persist in mounted volume |
3232

33-
## Development
34-
35-
### Healthcheck
36-
37-
Docker HEALTHCHECK runs `/usr/local/bin/healthcheck` every 2 minutes (after a 30s start period) ensuring:
38-
1. Python TensorFlow imports
39-
2. R can load Rsafd
40-
3. reticulate sees TensorFlow
41-
42-
### Build Locally (Multi-Arch)
43-
44-
```bash
45-
IMAGE=ghcr.io/princetonniversity/rsafd-docker:latest
46-
docker buildx create --name rsafd-builder --use 2>/dev/null || true
47-
docker buildx inspect --bootstrap
48-
docker buildx build --platform linux/amd64,linux/arm64 -t $IMAGE --push .
49-
```
50-
51-
### GitHub Actions Workflow
52-
53-
`.github/workflows/docker-multi-arch.yml` auto-builds on pushes to `main` and manual dispatch. Tags produced:
54-
* `latest`
55-
* Date stamp (`YYYYMMDD`)
56-
* Short SHA (12 chars)
57-
* Optional manual input tag
58-
59-
### Runtime Smoke Tests
60-
61-
Python:
62-
```python
63-
import tensorflow as tf, keras
64-
print(tf.__version__)
65-
```
66-
67-
R:
68-
```r
69-
library(Rsafd)
70-
library(reticulate)
71-
py <- import('tensorflow')
72-
py$`__version__`
73-
```
74-
75-
### Persistent Package Installs (User Space)
33+
## Persistent Package Installs
7634

7735
When you mount a host directory to `/workspace/notebooks`, the container creates a per-image hash directory that keeps any packages you install interactively:
7836

@@ -112,6 +70,20 @@ To “reset” just remove the directory on the host:
11270
rm -rf /path/on/host/.rsafd-docker-*/
11371
```
11472

73+
## Development
74+
75+
### Extending
76+
77+
Add R packages (example):
78+
```dockerfile
79+
RUN R -q -e "install.packages('xts', repos='https://cloud.r-project.org', dependencies=TRUE)"
80+
```
81+
82+
Add Python packages:
83+
```dockerfile
84+
RUN /opt/venv/bin/pip install --no-cache-dir xgboost
85+
```
86+
11587
### Troubleshooting
11688

11789
| Symptom | Cause | Fix |
@@ -121,14 +93,42 @@ rm -rf /path/on/host/.rsafd-docker-*/
12193
| Python cannot see newly installed pkg | Notebook kernel not restarted | Restart the kernel after `!pip install` |
12294
| R install asks for a CRAN mirror | Non-interactive mirror missing | Add `repos='https://cloud.r-project.org'` in `install.packages()` |
12395

124-
### Extending
96+
### Healthcheck
12597

126-
Add R packages (example):
127-
```dockerfile
128-
RUN R -q -e "install.packages('xts', repos='https://cloud.r-project.org', dependencies=TRUE)"
98+
Docker HEALTHCHECK runs `/usr/local/bin/healthcheck` every 2 minutes (after a 30s start period) ensuring:
99+
1. Python TensorFlow imports
100+
2. R can load Rsafd
101+
3. reticulate sees TensorFlow
102+
103+
### Multi-Arch Local Build
104+
105+
```bash
106+
IMAGE=ghcr.io/princetonniversity/rsafd-docker:latest
107+
docker buildx create --name rsafd-builder --use 2>/dev/null || true
108+
docker buildx inspect --bootstrap
109+
docker buildx build --platform linux/amd64,linux/arm64 -t $IMAGE --push .
129110
```
130111

131-
Add Python packages:
132-
```dockerfile
133-
RUN /opt/venv/bin/pip install --no-cache-dir xgboost
112+
### GitHub Actions Workflow
113+
114+
`.github/workflows/docker-multi-arch.yml` auto-builds on pushes to `main` and manual dispatch. Tags produced:
115+
* `latest`
116+
* Date stamp (`YYYYMMDD`)
117+
* Short SHA (12 chars)
118+
* Optional manual input tag
119+
120+
### Runtime Smoke Tests
121+
122+
Python:
123+
```python
124+
import tensorflow as tf, keras
125+
print(tf.__version__)
126+
```
127+
128+
R:
129+
```r
130+
library(Rsafd)
131+
library(reticulate)
132+
py <- import('tensorflow')
133+
py$`__version__`
134134
```

0 commit comments

Comments
 (0)