I want to build the docker image manually with previous downloaded freesurfer to save time.
I copied freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz and license.txt into the BIDS-Apps/freesurfer clone folder, then modified the Dockerfile head part:
FROM ubuntu:16.04
RUN tar --no-same-owner -C /opt \
--exclude='freesurfer/trctrain' \
--exclude='freesurfer/subjects/fsaverage_sym' \
--exclude='freesurfer/subjects/fsaverage3' \
--exclude='freesurfer/subjects/fsaverage4' \
--exclude='freesurfer/subjects/fsaverage5' \
--exclude='freesurfer/subjects/fsaverage6' \
--exclude='freesurfer/subjects/cvs_avg35' \
--exclude='freesurfer/subjects/cvs_avg35_inMNI152' \
--exclude='freesurfer/subjects/bert' \
--exclude='freesurfer/subjects/V1_average' \
--exclude='freesurfer/average/mult-comp-cor' \
--exclude='freesurfer/lib/cuda' \
--exclude='freesurfer/lib/qt' \
-zxvf freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz
COPY license.txt /opt/freesurfer/
RUN apt-get update
RUN apt-get install -y python3
...
I pulled ubuntu first:
docker pull ubuntu:16.04
Then build:
docker build -t fresurfer:6.0.0 .
And get this error:
Sending build context to Docker daemon 4.918GB
Step 1/48 : FROM ubuntu:16.04
---> 5e13f8dd4c1a
Step 2/48 : RUN tar --no-same-owner -C /opt --exclude='freesurfer/trctrain' --exclude='freesurfer/subjects/fsaverage_sym' --exclude='freesurfer/subjects/fsaverage3' --exclude='freesurfer/subjects/fsaverage4' --exclude='freesurfer/subjects/fsaverage5' --exclude='freesurfer/subjects/fsaverage6' --exclude='freesurfer/subjects/cvs_avg35' --exclude='freesurfer/subjects/cvs_avg35_inMNI152' --exclude='freesurfer/subjects/bert' --exclude='freesurfer/subjects/V1_average' --exclude='freesurfer/average/mult-comp-cor' --exclude='freesurfer/lib/cuda' --exclude='freesurfer/lib/qt' -zxvf freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz
---> Running in 6428bc61f682
tar (child): freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
The command '/bin/sh -c tar --no-same-owner -C /opt --exclude='freesurfer/trctrain' --exclude='freesurfer/subjects/fsaverage_sym' --exclude='freesurfer/subjects/fsaverage3' --exclude='freesurfer/subjects/fsaverage4' --exclude='freesurfer/subjects/fsaverage5' --exclude='freesurfer/subjects/fsaverage6' --exclude='freesurfer/subjects/cvs_avg35' --exclude='freesurfer/subjects/cvs_avg35_inMNI152' --exclude='freesurfer/subjects/bert' --exclude='freesurfer/subjects/V1_average' --exclude='freesurfer/average/mult-comp-cor' --exclude='freesurfer/lib/cuda' --exclude='freesurfer/lib/qt' -zxvf freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz' returned a non-zero code: 2
I want to build the docker image manually with previous downloaded freesurfer to save time.
I copied freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz and license.txt into the BIDS-Apps/freesurfer clone folder, then modified the Dockerfile head part:
I pulled ubuntu first:
docker pull ubuntu:16.04
Then build:
docker build -t fresurfer:6.0.0 .
And get this error: