Skip to content

Commit 45556eb

Browse files
committed
Updated README with new Docker install details, added main branch to image builds, closes #59
1 parent c198c97 commit 45556eb

File tree

2 files changed

+63
-35
lines changed

2 files changed

+63
-35
lines changed

.github/workflows/build-and-publish-image.yml

+9-10
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@
22
# https://github.com/VaultVulp/gp-docker-action#complete-workflow-example
33
name: Build and publish
44

5-
on:
5+
on:
66
push:
77
branches:
8-
- "v3-dev"
8+
- ["main", "v3-dev"]
99

1010
jobs:
11-
build-and-publish-head:
11+
build-and-publish-image:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/[email protected]
15+
- uses: actions/[email protected]
1616

17-
- name: Build and publish "head" Docker image
18-
uses: VaultVulp/[email protected]
19-
with:
20-
github-token: ${{ secrets.GITHUB_TOKEN }}
21-
image-name: mitre/growthviz
22-
image-tag: v3
17+
- name: Build and publish Docker image
18+
uses: VaultVulp/[email protected]
19+
with:
20+
github-token: ${{ secrets.GITHUB_TOKEN }}
21+
image-name: mitre/growthviz

README.md

+54-25
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ different software languages and packages:
7171

7272
- Data analysis is performed using [NumPy](https://numpy.org/) and
7373
[Pandas](https://pandas.pydata.org/). The output of growthcleanr will be
74-
loaded into a [pandas
75-
DataFrame](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html).
74+
loaded into a
75+
[pandas DataFrame](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html).
7676
GrowthViz provides functions for transforming DataFrames to support
7777
calculation of some values, such as BMI, as well as supporting visualizations.
7878
It is expected that users will create views into or copies of the DataFrames
@@ -91,21 +91,21 @@ to run and view GrowthViz.
9191

9292
1. Install Anaconda
9393

94-
- Follow install instructions [found here for
95-
installation.](https://docs.anaconda.com/anaconda/install/)
94+
- Follow install instructions
95+
[found here for installation.](https://docs.anaconda.com/anaconda/install/)
9696
- Opt for the Python 3.7 version
97-
- The [windows install
98-
instructions](https://docs.anaconda.com/anaconda/install/windows/) are
99-
step-by-step and will get everything set up properly for the project.
97+
- The
98+
[windows install instructions](https://docs.anaconda.com/anaconda/install/windows/)
99+
are step-by-step and will get everything set up properly for the project.
100100

101101
2. Download the [GrowthViz project](https://github.com/mitre/GrowthViz) as a zip
102102
file using the "Clone or download" button on GitHub.
103103

104104
3. Unzip the GrowthViz zip file to have access to all of the source files for
105105
the Jupyter notebook.
106106

107-
4. Run the Anaconda Navigator that was installed during Step 1 (go to
108-
Start > Anaconda Navigator). This may take a while to load.
107+
4. Run the Anaconda Navigator that was installed during Step 1 (go to Start >
108+
Anaconda Navigator). This may take a while to load.
109109

110110
5. Before Launching the Jupyter Notebook application (shown on the home page),
111111
download one additional dependency "Qgrid". To do this:
@@ -145,16 +145,17 @@ to run and view GrowthViz.
145145
OR click the 'Cell' dropdown in the menu bar and select 'Run all' to test the
146146
entire notebook all at once.
147147

148-
If not using Anaconda, specific versions of packages can be found in `requirements.txt`.
148+
If not using Anaconda, specific versions of packages can be found in
149+
`requirements.txt`.
149150

150151
## Sample data and first run testing
151152

152153
By default when you reach Step 6 of the [Simple Install](#simple-install)
153154
instructions above the notebook will use sample data loaded from the `.csv`
154155
files located in the GrowthViz project. This is the same synthetic sample data
155156
that is packaged with
156-
[growthcleanr](https://github.com/carriedaymont/growthcleanr), cleaned and
157-
then separated into pediatric and adult sets for GrowthViz.
157+
[growthcleanr](https://github.com/carriedaymont/growthcleanr), cleaned and then
158+
separated into pediatric and adult sets for GrowthViz.
158159

159160
To ensure that all of the necessary example files are present, run the
160161
`check_setup.py` script.
@@ -163,22 +164,44 @@ To ensure that all of the necessary example files are present, run the
163164

164165
Docker allows for the ability to download GrowthViz and its dependencies in an
165166
environment. To use this method,
166-
[download and install Docker Desktop](https://www.docker.com/products/docker-desktop)
167+
[download and install Docker Desktop](https://www.docker.com/products/docker-desktop).
168+
It also requires a GitHub account and a GitHub (personal access
169+
token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
167170

168-
1. Download GrowthViz-Docker with the following command:
171+
1. Log in to GitHub (create an account if required).
169172

170-
- `docker run -it -p 8888:8888 -v [data-path]/growthviz-data:/usr/src/app/growthviz-data mitre/growthviz`
173+
2. In GitHub, create a
174+
[fine-grained personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-fine-grained-personal-access-token).
175+
Note that these have an expiration date with a configurable term; you may
176+
have to regenerate this token.
177+
178+
3. Copy the token value and store it somewhere safe on your local machine.
179+
180+
4. On the command line, log in to GitHub's container registry:
181+
182+
```bash
183+
docker login ghcr.io --username [your-GitHub-username]
184+
```
185+
186+
5. At the `Password:` prompt, paste in your token value (created in step 2).
187+
188+
6. Download and run GrowthViz-Docker with the following command. This may take
189+
several minutes to download components, especially the first time.
190+
191+
```bash
192+
docker run -it -p 8888:8888 -v [data-path]/growthviz-data:/usr/src/app/growthviz-data ghcr.io/mitre/growthviz/mitre/growthviz
193+
```
171194

172195
- Replace the `[data-path]` with a directory path you choose on your local
173-
computer. For instance, choose: `~/Documents` which means that a folder
174-
named `/growthviz-data` will be created in the Documents folder. To
175-
input data into GrowthViz, add CSV files in this `/growthviz-data` folder.
196+
computer. For instance, choose: `~/Documents` which means that a folder named
197+
`/growthviz-data` will be created in the Documents folder. To input data into
198+
GrowthViz, add CSV files in this `/growthviz-data` folder.
176199

177200
- Note also that when mapping a folder on Windows, you may be prompted to
178201
confirm that you indeed want to "Share" the folder. This is a standard Windows
179202
security practice, and it is okay to confirm and proceed.
180203

181-
2. View GrowthViz
204+
7. View GrowthViz
182205

183206
- After running the above command, several lines of text will appear. Choose the
184207
third URL in this text and navigate to it in a web browser.
@@ -188,26 +211,32 @@ environment. To use this method,
188211
- Within the browser, click on the file `GrowthViz.ipynb`. This will open a new
189212
window with the GrowthViz Jupyter Notebook.
190213

191-
3. Run GrowthViz
214+
8. Run GrowthViz
192215

193216
- You can choose to either click the `Run` button to step through the various
194217
blocks (cells) of the document, OR click the 'Cell' dropdown in the menu bar
195218
and select 'Run all' to test the entire notebook all at once. However, this
196219
will run with the default sample data. Step 4 will explain how to use your own
197220
data.
198221

199-
4. Input Your Own Dataset CSVs
222+
9. Input Your Own Dataset CSVs
200223

201224
- To input your own data, drop a file `[name-of-your-file.csv]` into the
202225
`/growthviz-data` folder you created in step 1.
203226

204227
- Then, navigate to Cells 7 and 28 and replace:
205228

206-
- `cleaned_obs = pd.read_csv("sample-data-cleaned.csv")` with
229+
```python
230+
cleaned_obs = pd.read_csv("sample-data-cleaned.csv")
231+
```
232+
233+
...with:
207234

208-
- `cleaned_obs = pd.read_csv("growthviz-data/[name-of-your-file.csv]")`
235+
```python
236+
cleaned_obs = pd.read_csv("growthviz-data/[name-of-your-file.csv]")
237+
```
209238

210-
- Where [name-of-your-file.csv] is the input CSV file you placed in your
239+
- Where `[name-of-your-file.csv]` is the input CSV file you placed in your
211240
`/growthviz-data` folder.
212241

213242
#### Output boxes
@@ -220,6 +249,6 @@ charts and graphs used to explore the growthcleanr data. Descriptions of each
220249

221250
## Notice
222251

223-
Copyright 2020-2021 The MITRE Corporation.
252+
Copyright © 2020-2022 The MITRE Corporation.
224253

225254
Approved for Public Release; Distribution Unlimited. Case Number 19-2008

0 commit comments

Comments
 (0)