Is there something that I'm not doing to make sure that these volumes are mounted?
```
/metadata
/trainingData
/preprocessedData
```
I have created my docker image by copying the supplied python docker image:
```
dm-python-example
```
by pulling the directory, with docker, then renaming it, updating the runnable files, and pushing it back.
I'm not seeing the directories that are supposed to be mounted for the preprocessing phase. The lines in preprocess.sh are:
```
cp /metadata/exams_metadata.tsv /preprocessedData/
cp /metadata/images_crosswalk.tsv /preprocessedData/
```
I get:
```
cp: cannot stat ?/metadata/exams_metadata.tsv?: No such file or directory
cp: cannot stat ?/metadata/images_crosswalk.tsv?: No such file or directory
```
I have tried, the preprocess.sh file:
```
df -H
```
I get:
```
Filesystem Size Used Avail Use% Mounted on
none 211G 1.4G 199G 1% /
tmpfs 1.1G 0 1.1G 0% /dev
tmpfs 1.1G 0 1.1G 0% /sys/fs/cgroup
/dev/sda1 211G 1.4G 199G 1% /etc/hosts
shm 68M 0 68M 0% /dev/shm
```
So it looks as if those volumes are not mounted.
In the Dockerfile, I've tried adding the line:
```
RUN df -H
```
I get:
```
Step 8 : RUN df -H
---> Running in 6e2a4e75db66
Filesystem Size Used Avail Use% Mounted on
none 211G 1.4G 199G 1% /
tmpfs 1.1G 0 1.1G 0% /dev
tmpfs 1.1G 0 1.1G 0% /sys/fs/cgroup
/dev/sda1 211G 1.4G 199G 1% /etc/hosts
shm 68M 0 68M 0% /dev/shm
---> 26372518d670
```
The Dockerfile COPY statements seem to work OK:
```
Step 11 : COPY train.py /train.py
---> 37d666a7f176
Removing intermediate container 1590bf4b518f
Step 12 : COPY train.sh /train.sh
---> 237a5aab1215
Removing intermediate container 94b4089a6c7f
Step 13 : COPY test.sh /test.sh
---> 3df1b2bfa7ee
Removing intermediate container 4758d0ce5904
Step 14 : COPY preprocess.sh /preprocess.sh
---> 2e1253d97ac6
Removing intermediate container 28b3d20ab1f6
Step 15 : RUN /test.sh
---> Running in 6d21facf4ca2
```
I've tried using the Docker 'VOLUME' command too:
```
Step 10 : VOLUME /metadata
---> Running in 4fcf84a5c760
---> 2fc2491f2186
Removing intermediate container 4fcf84a5c760
Step 11 : VOLUME /trainingData
---> Running in 0a140540ec25
---> bd959073ef04
Removing intermediate container 0a140540ec25
Step 12 : VOLUME /preprocessedData
---> Running in c05f696d1933
---> 3823cbff1580
Removing intermediate container c05f696d1933
```
When I look at these directories, though, they are empty:
```
Step 11 : VOLUME /preprocessedData
---> Using cache
---> 42b6f78a0fd7
Step 12 : RUN ls -l /preprocessedData
---> Running in 07364a6878f8
total 0
---> 24cf62892872
Removing intermediate container 07364a6878f8
Step 13 : VOLUME /metadata
---> Running in 7062db5b3f8c
---> e88d57828dc8
Removing intermediate container 7062db5b3f8c
Step 14 : RUN ls -l /metadata
---> Running in 60ba300bf044
total 0
---> c3c366272c81
```
Created by Peter Brooks fustbariclation Hi, again: I spent some time checking that the volume mounts work as expected. The details are in another thread:
https://www.synapse.org/#!Synapse:syn4224222/discussion/threadId=1081
I'm hoping that this problem has passed but if you continue to have problems please let me know. Thank you. > In the file preprocess.sh these are the two lines that cause the 'cannot stat':
Yes, that much was clear. I was asking *how* you went about running /preprocess.sh. I think the details will reveal an error you made.
Further, you say:
> When I look at these directories, though, they are empty:
> Step 12 : RUN ls -l /preprocessedData
> ---> Running in 07364a6878f8
> total 0
I think you have a fundamental misunderstanding of how Docker works: When you execute 'docker build' the commands of the Dockerfile are run in the context of your local environment. It is only when we run your container that the volumes (/metadata, /preprocessedData, etc.) are mounted. So it make sense that if you try to interrogate the non-existent volumes while building your Docker image you won't find any content. There are some really great doc's on how to use Docker that you might enjoy [here](https://docs.docker.com/).
Hope this helps.
In the file preprocess.sh these are the two lines that cause the 'cannot stat':
```
cp /metadata/exams_metadata.tsv /preprocessedData/
cp /metadata/images_crosswalk.tsv /preprocessedData/
```
Peter:
You say:
> I get:
> cp: cannot stat ?/metadata/exams_metadata.tsv?: No such file or directory
> cp: cannot stat ?/metadata/images_crosswalk.tsv?: No such file or directory
Can you say a bit more about how you generated this error message? That is, you explained how you built and pushed your image, but what did you do next, to arrive at the error message you cite?
Drop files to upload
preprocess.sh - not seeing directories page is loading…