[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] How to volume mount condor docker universe to current directory ?



Hi Greg,

 

Appreciate your fast response.

I am trying to mount the directory /disk-root/condor/execute/dir_199288 to /data inside the Docker container.  The reason is that the application reads and writes to /data,  and I canât change the docker image such that the Symlink is created between /data to /disk-root/condor/execute/dir_199288

 

I want to add something like this to the Docker run command  --volume /disk-root/condor/execute/dir_199288:/data

 

I tried to add the following line to the condor local config file:

 

DOCKER_VOLUME_DIR_EXECUTE = $(_CONDOR_SCRATCH_DIR):/data

 

But it is not finding the macro $_CONDOR_SCRATCH_DIR, error message is listed below:

 

usr/bin/docker: Error response from daemon: Invalid volume spec ":/data": Invalid volume specification: ':/data'.

 

Appreciate your help!

 

Respectfully,

Bowen

 

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of Greg Thain <gthain@xxxxxxxxxxx>
Reply-To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Date: Wednesday, July 5, 2017 at 3:49 PM
To: "htcondor-users@xxxxxxxxxxx" <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] How to volume mount condor docker universe to current directory ?

 

On 07/05/2017 03:40 PM, Dan, Bowen wrote:

Hi Greg,

 

I meant the current directory on the execute machine, sorry that my question wasnât clear before, I am very new to condor.

 



 

/usr/bin/docker run --cpu-shares=10 --memory=4608m --cap-drop=all --hostname condor-7519.0-ip-xx-xxx-xxx-xx.localdomain --name HTCJob7519_0_slot1_1_PID199288 -e TEMP=/disk-root/condor/execute/dir_199288 -e _CONDOR_SCRATCH_DIR=/disk-root/condor/execute/dir_199288 -e _CONDOR_SLOT=slot1_1 -e BATCH_SYSTEM=HTCondor -e TMPDIR=/disk-root/condor/execute/dir_199288 -e _CONDOR_CHIRP_CONFIG=/disk-root/condor/execute/dir_199288/.chirp.config -e _CONDOR_JOB_PIDS= -e TMP=/disk-root/condor/execute/dir_199288 -e OMP_NUM_THREADS=1 -e _CONDOR_JOB_AD=/disk-root/condor/execute/dir_199288/.job.ad -e _CONDOR_JOB_IWD=/disk-root/condor/execute/dir_199288 -e _CHIRP_DELAYED_UPDATE_PREFIX=Chirp* -e _CONDOR_MACHINE_AD=/disk-root/condor/execute/dir_199288/.machine.ad --volume /disk-root/condor/execute/dir_199288:/disk-root/condor/execute/dir_199288 --volume /rcp-dfs:/data --volume /etc/rcp.json:/etc/rcp.json --volume /etc/bf-production.cfg:/etc/bf-production.cfg --volume /opt:/opt --workdir /disk-root/condor/execute/dir_199288 --user 65534:65534 hdr_test:latest /app/bin/HDRPipeline/Session/StartPipelineSession.py --session_setting=00.generation.json


Ah, I see -- note this is what we call the "scratch directory", or "sandbox" in condor, and is mounted in the same location inside the container:

/usr/bin/docker run --cpu-shares=10 --memory=4608m --cap-drop=all --hostname condor-7519.0-ip-xx-xxx-xxx-xx.localdomain --name HTCJob7519_0_slot1_1_PID199288 -e TEMP=/disk-root/condor/execute/dir_199288 -e _CONDOR_SCRATCH_DIR=/disk-root/condor/execute/dir_199288 -e _CONDOR_SLOT=slot1_1 -e BATCH_SYSTEM=HTCondor -e TMPDIR=/disk-root/condor/execute/dir_199288 -e _CONDOR_CHIRP_CONFIG=/disk-root/condor/execute/dir_199288/.chirp.config -e _CONDOR_JOB_PIDS= -e TMP=/disk-root/condor/execute/dir_199288 -e OMP_NUM_THREADS=1 -e _CONDOR_JOB_AD=/disk-root/condor/execute/dir_199288/.job.ad -e _CONDOR_JOB_IWD=/disk-root/condor/execute/dir_199288 -e _CHIRP_DELAYED_UPDATE_PREFIX=Chirp* -e _CONDOR_MACHINE_AD=/disk-root/condor/execute/dir_199288/.machine.ad --volume /disk-root/condor/execute/dir_199288:/disk-root/condor/execute/dir_199288  --volume /rcp-dfs:/data --volume /etc/rcp.json:/etc/rcp.json --volume /etc/bf-production.cfg:/etc/bf-production.cfg --volume /opt:/opt --workdir /disk-root/condor/execute/dir_199288 --user 65534:65534 hdr_test:latest /app/bin/HDRPipeline/Session/StartPipelineSession.py --session_setting=00.generation.json

and that is the current directory inside the container, and the value of the environment variables $_CONDOR_SCRATCH_DIR inside.

-greg