Skip to content

Commit 3310c7a

Browse files
committed
Rename testoutput to output to match main repo
1 parent 309b70b commit 3310c7a

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// The optional 'runArgs' property can be used to specify additional runtime arguments.
1414
"runArgs": [
1515
"-v","chaste_data:/home/chaste",
16-
"-v","./testoutput:/home/testoutput"
16+
"-v","./output:/home/output"
1717
// Uncomment the next line if you want to use Docker from the container. See the docker-in-docker definition for details.
1818
// "-v","/var/run/docker.sock:/var/run/docker.sock",
1919

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ ENV PATH "${CHASTE_DIR}/scripts:${PATH}"
115115
ENV CHASTE_SOURCE_DIR="${CHASTE_DIR}/src" \
116116
CHASTE_BUILD_DIR="${CHASTE_DIR}/build" \
117117
CHASTE_PROJECTS_DIR="${CHASTE_DIR}/src/projects" \
118-
CHASTE_TEST_OUTPUT="${CHASTE_DIR}/testoutput"
118+
CHASTE_TEST_OUTPUT="${CHASTE_DIR}/output"
119119
# CMake environment variables
120120
ARG CMAKE_BUILD_TYPE="Debug"
121121
ARG Chaste_ERROR_ON_WARNING="ON"

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CHASTE_DATA_VOLUME?=chaste_data
1313

1414
# Optional mounts
1515
# PROJECTS?="${HOME}/projects"
16-
# TEST_OUTPUT?="${HOME}/testoutput"
16+
# TEST_OUTPUT?="${HOME}/output"
1717

1818
# SRC?=$(shell dirname `pwd`)
1919
TARGET?=
@@ -111,7 +111,7 @@ ifdef PROJECTS
111111
MOUNTS += -v $(PROJECTS):$(CHASTE_DIR)/projects
112112
endif
113113
ifdef TEST_OUTPUT
114-
MOUNTS += -v $(TEST_OUTPUT):$(CHASTE_DIR)/testoutput
114+
MOUNTS += -v $(TEST_OUTPUT):$(CHASTE_DIR)/output
115115
endif
116116

117117
run: build

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ This is a bash prompt within an isolated Docker container (based on [ubuntu](htt
8989
9090
If you don't already have a project, just use the provided script `new_project.sh` to create a project template in `~/projects` as a starting point. Many tutorials for projects can be found here: https://chaste.cs.ox.ac.uk/trac/wiki/UserTutorials.
9191
92-
Once you have a project ready to build, use the script `build_project.sh <TestMyProject> c` (replacing `<TestMyProject>` with the name of your project) and you will find the output in `~/testoutput` (the `c` argument is only necessary when new files are created).
92+
Once you have a project ready to build, use the script `build_project.sh <TestMyProject> c` (replacing `<TestMyProject>` with the name of your project) and you will find the output in `~/output` (the `c` argument is only necessary when new files are created).
9393
94-
> :information_source: To easily share data between the Docker container and the host e.g. the `testoutput` directory, a bind-mount argument can be added to the command: `-v /host/path/to/testoutput:/home/chaste/testoutput`. See the instructions on [bind mounts](#bind-mounts) for further details.
94+
> :information_source: To easily share data between the Docker container and the host e.g. the `output` directory, a bind-mount argument can be added to the command: `-v /host/path/to/output:/home/chaste/output`. See the instructions on [bind mounts](#bind-mounts) for further details.
9595
9696
When you are finished with the container, simply type `exit` or press `Ctrl+D` to close it (if necessary, pressing `Ctrl+C` first to stop any running processes). Any changes made in `/home/chaste` will persist when you relaunch a container, however if the container is deleted, everything else (e.g. installed packages, changes to system files) will be reset to how it was when the image was first used.
9797
@@ -115,7 +115,7 @@ Once launched, the container will start in the `chaste` user's home directory at
115115
|-- projects -> /home/chaste/src/projects
116116
|-- scripts
117117
|-- src
118-
`-- testoutput
118+
`-- output
119119
```
120120

121121
These folders contain the following types of data:
@@ -124,14 +124,14 @@ These folders contain the following types of data:
124124
- `projects`: a symlink to `/home/chaste/src/projects` for user projects
125125
- `scripts`: convenience scripts for creating, building and testing projects
126126
- `src`: the Chaste source code
127-
- `testoutput`: the output folder for the project testing framework (set with `$CHASTE_TEST_OUTPUT`)
127+
- `output`: the output folder for the project testing framework (set with `$CHASTE_TEST_OUTPUT`)
128128

129129
Corresponding environment variables are also set as follows:
130130
- `CHASTE_DIR="/home/chaste"`
131131
- `CHASTE_BUILD_DIR="${CHASTE_DIR}/build"`
132132
- `CHASTE_PROJECTS_DIR="${CHASTE_DIR}/src/projects"`
133133
- `CHASTE_SOURCE_DIR="${CHASTE_DIR}/src"`
134-
- `CHASTE_TEST_OUTPUT="${CHASTE_DIR}/testoutput"`
134+
- `CHASTE_TEST_OUTPUT="${CHASTE_DIR}/output"`
135135

136136
> :information_source: If [building your own image](#building-your-own-image), the `CHASTE_DIR` path can be changed at buildtime with a build argument e.g. `--build-arg CHASTE_DIR=/path/to/alternative` which will then set the other directories relative to that path.
137137
@@ -144,22 +144,22 @@ Sharing data between the host and container
144144

145145
This image is set up to store the Chaste source code, compiled libraries and scripts in a [Docker volume](https://docs.docker.com/storage/volumes/) as this is the [recommended mechanism](https://docs.docker.com/storage/) for data persistence and yields the best File I/O performance across multiple platforms.
146146

147-
One drawback of this type of mount is that the contents are more difficult to access from the host. However, to gain direct access to e.g. the `testoutput` of the container from the host, or share datasets on the host with the container, a bind mount can be used (even overlaying a directory within the volume if needed).
147+
One drawback of this type of mount is that the contents are more difficult to access from the host. However, to gain direct access to e.g. the `output` of the container from the host, or share datasets on the host with the container, a bind mount can be used (even overlaying a directory within the volume if needed).
148148

149149
[![Docker mount options](https://docs.docker.com/storage/images/types-of-mounts.webp?w=450&h=300)](https://docs.docker.com/storage/)
150150

151151
*Docker mount options schematic from the [Docker documentation](https://docs.docker.com/storage/)*
152152

153153
### Bind mounts
154154

155-
Any host directory (specified with an absolute path e.g. `/path/to/testoutput`) may be mounted in the container e.g. the `testoutput` directory. Alternatively, navigate to the folder on the host which contains these directories e.g. `C:\Users\$USERNAME\chaste` (Windows) or `~/chaste` (Linux/macOS) and use `$(pwd)/testoutput` instead as shown below. In the following examples, the image name (final argument) is assumed to be `chaste/release` rather than e.g. `chaste/develop` or `chaste/release:2021.1` for simplicity.
155+
Any host directory (specified with an absolute path e.g. `/path/to/output`) may be mounted in the container e.g. the `output` directory. Alternatively, navigate to the folder on the host which contains these directories e.g. `C:\Users\$USERNAME\chaste` (Windows) or `~/chaste` (Linux/macOS) and use `$(pwd)/output` instead as shown below. In the following examples, the image name (final argument) is assumed to be `chaste/release` rather than e.g. `chaste/develop` or `chaste/release:2021.1` for simplicity.
156156
```
157-
docker run -it --init --rm -v chaste_data:/home/chaste -v "${PWD}"/testoutput:/home/chaste/testoutput chaste/release
157+
docker run -it --init --rm -v chaste_data:/home/chaste -v "${PWD}"/output:/home/chaste/output chaste/release
158158
```
159159

160160
### Copying data in and out
161161

162-
On macOS and Windows (but *not* Linux), reading and writing files in bind mounts from the host have a greater overhead than for files in Docker volumes. This may slow down simulations where there is a lot of File I/O in those folders (e.g. `testoutput`), so bind mounts should be used sparingly in such scenarios. A faster alternative would be to leave the files in a volume and use [`docker cp`](https://docs.docker.com/engine/reference/commandline/cp/) to copy them out at the end of the simulation (or copy modified files back in).
162+
On macOS and Windows (but *not* Linux), reading and writing files in bind mounts from the host have a greater overhead than for files in Docker volumes. This may slow down simulations where there is a lot of File I/O in those folders (e.g. `output`), so bind mounts should be used sparingly in such scenarios. A faster alternative would be to leave the files in a volume and use [`docker cp`](https://docs.docker.com/engine/reference/commandline/cp/) to copy them out at the end of the simulation (or copy modified files back in).
163163

164164
For example, use the following commands to copy the whole `src` folder, where the container has been labelled `chaste` e.g. with a command beginning: `docker run --name chaste ...`:
165165
```bash

scripts/set_env_vars.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fi
3232
echo "Chaste projects directory: $CHASTE_PROJECTS_DIR"
3333

3434
if [ -z "$CHASTE_TEST_OUTPUT" ]; then
35-
export CHASTE_TEST_OUTPUT="${CHASTE_DIR}/testoutput"
35+
export CHASTE_TEST_OUTPUT="${CHASTE_DIR}/output"
3636
fi
3737
echo "Chaste test outputs directory: $CHASTE_TEST_OUTPUT"
3838

0 commit comments

Comments
 (0)