Skip to content

Commit 8843fc1

Browse files
committed
fixing environment variable example
1 parent 0a26057 commit 8843fc1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pages/docs/user-docs/docs-docker.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ sudo singularity bootstrap tensorflow.img Singularity
9898
```
9999

100100
but just those two lines and doing bootstrap is silly, because we would achieve the same thing by doing:
101-
101+
environment
102102
```bash
103103
singularity create --size 4000 tensorflow.img
104104
singularity import tensorflow.img docker://tensorflow/tensorflow:latest
@@ -125,9 +125,9 @@ From: tensorflow/tensorflow:latest
125125
relative_path.py /tmp/analysis2.py
126126

127127
%environment
128-
129-
TOPSECRET pancakes
130-
HELLO WORLD
128+
TOPSECRET=pancakes
129+
HELLO=WORLD
130+
export HELLO TOPSECRET
131131

132132
%labels
133133

pages/docs/user-docs/docs-environment-metadata.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ From: ubuntu:latest
1919

2020
%environment
2121
VARIABLE_NAME=VARIABLE_VALUE
22+
export VARIABLE_NAME
2223
```
2324

2425
Forget something, or need a variable defined at runtime? You can set any variable you want inside the container by prefixing it with "SINGULARITYENV_". It will be transposed automatically and the prefix will be stripped. For example, let's say we want to set the variable `HELLO` to have value `WORLD`. We can do that as follows:

0 commit comments

Comments
 (0)