File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
opencga-analysis/src/main/java/org/opencb/opencga/analysis Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 12
12
import java .io .IOException ;
13
13
import java .nio .file .Files ;
14
14
import java .nio .file .Path ;
15
+ import java .nio .file .Paths ;
15
16
import java .util .*;
16
17
import java .util .stream .Stream ;
17
18
@@ -21,6 +22,7 @@ public abstract class OpenCgaDockerToolScopeStudy extends OpenCgaToolScopeStudy
21
22
protected List <AbstractMap .SimpleEntry <String , String >> dockerInputBindings ;
22
23
// Directory where temporal input files will be stored
23
24
protected Path temporalInputDir ;
25
+ protected Path ephimeralDir ;
24
26
25
27
protected InputFileUtils inputFileUtils ;
26
28
@@ -30,6 +32,7 @@ protected void check() throws Exception {
30
32
this .dockerInputBindings = new LinkedList <>();
31
33
this .temporalInputDir = Files .createDirectory (getOutDir ().resolve (".opencga_input" ));
32
34
this .inputFileUtils = new InputFileUtils (catalogManager );
35
+ this .ephimeralDir = Paths .get ("/usr/share/pod" );
33
36
}
34
37
35
38
@ Override
Original file line number Diff line number Diff line change @@ -191,6 +191,10 @@ protected void run() throws Exception {
191
191
dockerInputBindings .add (new AbstractMap .SimpleEntry <>(path .toString (), path .toString ()));
192
192
}
193
193
194
+ // Mount ephimeral directory
195
+ dockerInputBindings .add (new AbstractMap .SimpleEntry <>(ephimeralDir .toAbsolutePath ().toString (),
196
+ ephimeralDir .toAbsolutePath ().toString ()));
197
+
194
198
// Write nextflow.config file
195
199
URL nextflowConfig = getClass ().getResource ("/nextflow.config" );
196
200
Path nextflowConfigPath ;
@@ -234,7 +238,7 @@ protected void run() throws Exception {
234
238
// Set HOME environment variable to the temporal input directory. This is because nextflow creates a hidden folder there and,
235
239
// when nextflow runs on other dockers, we need to store those files in a path shared between the parent docker and the host
236
240
// TODO: Temporal solution
237
- dockerParams .put ("-e" , "HOME=" + temporalInputDir + " -e OPENCGA_TOKEN=" + getExpiringToken ());
241
+ dockerParams .put ("-e" , "HOME=" + ephimeralDir + " -e OPENCGA_TOKEN=" + getExpiringToken ());
238
242
239
243
// dockerParams.put("-e", "HOME=" + temporalInputDir);
240
244
// dockerParams.put("-e", "OPENCGA_TOKEN=" + getExpiringToken());
You can’t perform that action at this time.
0 commit comments