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 1212import java .io .IOException ;
1313import java .nio .file .Files ;
1414import java .nio .file .Path ;
15+ import java .nio .file .Paths ;
1516import java .util .*;
1617import java .util .stream .Stream ;
1718
@@ -21,6 +22,7 @@ public abstract class OpenCgaDockerToolScopeStudy extends OpenCgaToolScopeStudy
2122 protected List <AbstractMap .SimpleEntry <String , String >> dockerInputBindings ;
2223 // Directory where temporal input files will be stored
2324 protected Path temporalInputDir ;
25+ protected Path ephimeralDir ;
2426
2527 protected InputFileUtils inputFileUtils ;
2628
@@ -30,6 +32,7 @@ protected void check() throws Exception {
3032 this .dockerInputBindings = new LinkedList <>();
3133 this .temporalInputDir = Files .createDirectory (getOutDir ().resolve (".opencga_input" ));
3234 this .inputFileUtils = new InputFileUtils (catalogManager );
35+ this .ephimeralDir = Paths .get ("/usr/share/pod" );
3336 }
3437
3538 @ Override
Original file line number Diff line number Diff line change @@ -191,6 +191,10 @@ protected void run() throws Exception {
191191 dockerInputBindings .add (new AbstractMap .SimpleEntry <>(path .toString (), path .toString ()));
192192 }
193193
194+ // Mount ephimeral directory
195+ dockerInputBindings .add (new AbstractMap .SimpleEntry <>(ephimeralDir .toAbsolutePath ().toString (),
196+ ephimeralDir .toAbsolutePath ().toString ()));
197+
194198 // Write nextflow.config file
195199 URL nextflowConfig = getClass ().getResource ("/nextflow.config" );
196200 Path nextflowConfigPath ;
@@ -234,7 +238,7 @@ protected void run() throws Exception {
234238 // Set HOME environment variable to the temporal input directory. This is because nextflow creates a hidden folder there and,
235239 // when nextflow runs on other dockers, we need to store those files in a path shared between the parent docker and the host
236240 // TODO: Temporal solution
237- dockerParams .put ("-e" , "HOME=" + temporalInputDir + " -e OPENCGA_TOKEN=" + getExpiringToken ());
241+ dockerParams .put ("-e" , "HOME=" + ephimeralDir + " -e OPENCGA_TOKEN=" + getExpiringToken ());
238242
239243// dockerParams.put("-e", "HOME=" + temporalInputDir);
240244// dockerParams.put("-e", "OPENCGA_TOKEN=" + getExpiringToken());
You can’t perform that action at this time.
0 commit comments