Skip to content

Commit dd146f9

Browse files
authored
docs: document .juliabundleignore in more detail (#105)
1 parent f87917e commit dd146f9

File tree

16 files changed

+284
-0
lines changed

16 files changed

+284
-0
lines changed

docs/src/reference/job-submission.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,30 @@ Batch jobs are Julia scripts with (optional) associated Julia package environmen
126126

127127
See also: [`@script_str`](@ref), [`script`](@ref), [`appbundle`](@ref) for more details, and the [guide on submitting batch jobs](@ref jobs-guide-batch) for a tutorial.
128128

129+
### [`.juliabundleignore` file](@id jobs-batch-juliabundleignore)
130+
131+
A `.juliabundleignore` file can be use to exclude certain files from the appbundle that gets submitted to JuliaHub.
132+
This is useful if you have some temporary development or data files in your project directory, in particular if they are large.
133+
134+
Generally, the file is similar to a `.gitignore` file (though not as feature rich), containing a list of [glob](https://en.wikipedia.org/wiki/Glob_(programming)) patterns.
135+
More precisely, it uses [Glob.jl](https://github.com/vtjnash/Glob.jl) to match the patterns in the file against file system paths.
136+
137+
For example, a valid `.juliabundleignore` might contain the following entries to exclude a particular directory and all CSV files:
138+
139+
```
140+
output.log
141+
*.csv
142+
output-data/
143+
```
144+
145+
This `.juliabundleignore` will ignore:
146+
147+
- The `output.log` file next to the `.juliabundleignore`.
148+
- All `.csv` files next to the `.juliabundleignore` and in subdirectories.
149+
- All the contents of the `output-data/` directory next to the `.juliabundleignore`.
150+
151+
You can also have additional `.juliabundleignore` files in subdirectories and they will only apply to those directories and their subdirectories.
152+
129153
### Specifying the job image
130154

131155
JuliaHub batch jobs can run in various container images.

src/jobsubmission.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,9 @@ The following should be kept in mind about how appbundles are handled:
738738
Registered packages are installed via the package manager via the standard environment
739739
instantiation, and their source code is not included in the bundle directly.
740740
741+
* You can use `.juliabundleignore` files to omit some files from the appbundle (secrets, large data files etc).
742+
See the [relevant section in the reference manual](@ref jobs-batch-juliabundleignore) for more details.
743+
741744
* When the JuliaHub job starts, the bundle is unpacked and the job's starting working directory
742745
is set to the root of the unpacked appbundle directory, and you can e.g. load the data from those
743746
files with just `read("my-data.txt", String)`.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file is machine-generated - editing it directly is not advised
2+
3+
julia_version = "1.12.0-rc1"
4+
manifest_format = "2.0"
5+
project_hash = "71853c6197a6a7f222db0f1978c7cb232b87c5ee"
6+
7+
[deps]

test/fixtures/bundle1/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[deps]

test/fixtures/bundle1/dir1/binary.exe

Whitespace-only changes.

test/fixtures/bundle1/dir1/foo.csv

Whitespace-only changes.

test/fixtures/bundle1/foo.csv

Whitespace-only changes.

test/fixtures/bundle1/keys.private

Whitespace-only changes.

test/fixtures/bundle1/output-data/bar

Whitespace-only changes.

test/fixtures/bundle1/output-data/foo

Whitespace-only changes.

0 commit comments

Comments
 (0)