Hi There,
I have developed model for the Multiple Melanoma Challenge 2. I have uploaded the required resources within Synapse (syn10721211). However when I tried to create the Docker image (command: docker build ) it is taking forever for ubuntu 16.04 . The step which running forever is "Reading package lists...". I do not know whether it will be completed before the deadline. I am new to Docker and being honest it is quite cumbersome to fix some of this technical issues. I am sure its great to organize each submitted model but at the level of submission it is really a time killer.
Any quick help will be greatly appreciated!
My Dockerfile is as follows:
FROM ubuntu:16.04
## Installing dependencies
RUN apt-get update
RUN apt-get -y install r-base
## Install dependencies
RUN Rscript -e 'source("http://bioconductor.org/biocLite.R"); biocLite("plyr")'
RUN Rscript -e 'source("http://bioconductor.org/biocLite.R"); biocLite("limma")'
RUN echo "r <- getOption('repos'); r['CRAN'] <- 'http://cran.us.r-project.org'; options(repos = r);" > ~/.Rprofile
RUN Rscript -e "install.packages('data.table')"
RUN Rscript -e "install.packages('glmnet')"
RUN Rscript -e "install.packages('pROC')"
## Make sure all files that your execution scripts need are in the Docker image
COPY Final_R_Code_Dream_Challenge_MM.R /Final_R_Code_Dream_Challenge_MM.R
COPY GPL570-55999.txt /GPL570-55999.txt
COPY overlap.csv /overlap.csv
COPY EMTAB4032entrezIDlevel.csv /EMTAB4032entrezIDlevel.csv
COPY globalClinTraining.csv /globalClinTraining.csv
COPY GSE19784HOVON65entrezIDlevel.csv /GSE19784HOVON65entrezIDlevel.csv
COPY MMRF_CoMMpass_IA9_E74GTF_Salmon_entrezID_TPM_hg19.csv /MMRF_CoMMpass_IA9_E74GTF_Salmon_entrezID_TPM_hg19.csv
COPY GSE24080UAMSprobelevel.csv /GSE24080UAMSprobelevel.csv
CMD ["/sbin/my_init"]
RUN Rscript Final_R_Code_Dream_Challenge_MM.R
Created by AVISEK DEYATI avisek.deyati Thank you so much Thomas, Mike and Mehrad! Really appreciate you help in sorting this out.
Best regards,
Avisek Dear Avisek,
On poor internet connection docker builds can take a long time. The estimated time for me to install all the dependencies and build the docker is about 30 minutes. You are formatting your dockerfile incorrectly. Please DO NOT put any training data into your docker image.
Please read [this section](#!Synapse:syn6187098/wiki/449443) carefully, as you can read in all of this data from `/test-data/....` in your script. Also please follow instructions [here](https://www.synapse.org/#!Synapse:syn6187098/wiki/449445) and make sure you have an executable bash script that calls your R code.
To further explain you should have a shell script called `score_sc1.sh` or `score_sc2.sh`. In this shell script you would have:
```
#!/bin/bash
Rscript Final_R_Code_Dream_Challenge_MM.R
```
The reason it is taking a long time for your to build your docker image is because you are calling `RUN Rscript` in the end. Your Dockerfile should look something like this:
```
FROM ubuntu:16.04
#Installing dependencies
RUN apt-get update && apt-get install -y r-base
#Install dependencies
RUN Rscript -e 'source("http://bioconductor.org/biocLite.R"); biocLite("plyr")'
RUN Rscript -e 'source("http://bioconductor.org/biocLite.R"); biocLite("limma")'
RUN echo "r <- getOption('repos'); r['CRAN'] <- 'http://cran.us.r-project.org'; options(repos = r);" > ~/.Rprofile
RUN Rscript -e "install.packages('data.table')"
RUN Rscript -e "install.packages('glmnet')"
RUN Rscript -e "install.packages('pROC')"
COPY Final_R_Code_Dream_Challenge_MM.R /Final_R_Code_Dream_Challenge_MM.R
COPY overlap.csv /overlap.csv
COPY score_sc1.sh /score_sc1.sh
```
Dear Avisek
Submitting to Round 1 is not a requirement for submitting to Round 2 or the final Validation round. Additionally awards are **not** predicated on leader board scores. These round are just to give you an idea of how your method is doing.
Thanks for your help on this issue Mehrad!
I am going to have a more docker wise collaborator follow up on this post too. Building for the first time takes lots of time, but if you have a stable Dockerfile setting and only change the files you have in your docker, every build would take about a minute or less.
Also, it might be easy to solve issue when you run your Docker and go through it in interactive way:
```
docker run -i -t docker.synapse.org/syn12345678/sc1_expresslane:v01 /bin/bash
```
I also think the last two lines of your Dockerfile is not necessary if you don't want to run it locally (since interactive way gives you more agility in terms of debugging)
Drop files to upload
Building Doker image is taking forever For Ubuntu page is loading…