tilburgsciencehub / music-to-scrape

A fictitious music streaming service with a real website and API so you can learn how to scrape!
https://music-to-scrape.org
3 stars 6 forks source link

Docker not running #33

Closed thierrylahaije closed 1 year ago

thierrylahaije commented 1 year ago

I tried to run the Dockerfile, but i got the following error:

failed to solve: executor failed running [/bin/sh -c conda install -c r r-base r-data.table r-dbi r-rsqlite && R -e "install.packages('curl', repos='http://cran.rstudio.com/')" && pip install fastapi fastapi-utils sqlalchemy pydantic uvicorn gunicorn flask flask_sqlalchemy]: exit code: 1

It seems that the Dockerfile expects users to have Conda. I think this is not the right way, since not all users will use Conda (e.g. I personally do not use it because it sometimes creates problems with folder structure when installing libraries).

Can we find a way around this?

thierrylahaije commented 1 year ago

Sorry, it had to do with something else. Conda was not able to find the correct packages. I had to adjust the second run as follows:

RUN conda update -n base -c defaults conda && \ conda install -c conda-forge -c r r-base=4.1.3 r-data.table r-dbi r-rsqlite && \ R -e "install.packages('curl', repos='http://cran.rstudio.com/')" && \ pip install fastapi fastapi-utils sqlalchemy pydantic uvicorn gunicorn flask flask_sqlalchemy

The problem now is that it takes about 6 minutes to fully build the docker container in my case. Is this common or is this excessive?

@DiSanchz could you look into this issue?

hannesdatta commented 1 year ago

@thierrylahaije, I assume you are simulating for 1k users? Then this is totally legit it takes six minutes and no need to look into this, @DiSanchz.

Can u let me know?

DiSanchz commented 1 year ago

Regarding the conda packages issue with the second run, even if not a big deal that is a bit weird in any case. Docker's main advantage is supposed to be precisely avoiding these kinds of issues, as all containers are created equal and what works within one should work exactly the same in all of them. I'll take a look at that... did you experience similar issues @hannesdatta?

hannesdatta commented 1 year ago

Very good point. I was also confused this happened.

I didn't have any issues in building the ones you committed to initially.

Let's not do more with that at this stage but keep it as a side issue on our minds. If we face similar problems, we can delve in. But now, it would be too distracting.