-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dockerization guide clarity #37
Comments
Thanks for doing that @wenyunie! I tried testing out the docker container and it worked on my computer (although it was kind of slow to run, maybe because I'm on a windows machine 🥲 ) One thing I did notice was that the package Hmsic doesn't seem to be installed (I was given this prompt): I was looking through the renv file and noticed that Hmsic wasn't installed there - but I seemed to have some issues when I tried to take a snapshot on my end (Hmsic wasn't one of the packages being added as shown in the screenshot here). Just as a note, I didn't install anything by the way, and pruned the local branch I created to try and look into this issue. I'm kind of at a loss as to why this is the case 🤔 |
@monazhu I will add Hmisc to our Dockerfile first, so that our Dockerization Path could go correctly. The case with renv is indeed very strange. You mean you tried to renv::snapshot() on top of the current renv.lock, but Hmisc is still not added right? |
Okay sounds good - thanks!! Yeah, what I did was I installed then loaded the Hmsic in the 03-analysis.Rmd file, but when I tried to run renv::snapshot(), Hmsic doesn't show up 🥲 |
That's super strange, because I had explicitly loaded the package before running renv::snapshot() but Hmisc wasn't showing up. I'm not sure doing this in the parent file should matter (in theory, I don't think it should make a difference, since renv was able to pick up the other packages when you did the snapshot before) |
Did you load it in the console or write it in a file within the project (it seems you do not need to load it in the environment but adding the line 'library(Hmisc)' and saving the code is important here). Indirect dependencies are also included in the snapshot. I guess the case with Hmisc is, Hmisc is loaded directly or indirectly in our environment but 'library(Hmisc)' is not in the code within the scope of the project and it is also not an indirect dependency of those that are within the scope. |
Yeah I also initially thought it was because I wasn't saving the code - but even after saving the code and re-running renv::snapshot(), that didn't seem to change Here's what I'm doing for full reproducibility:
🥲 It's getting quite late for me (I need to wake up early since my commute is quite long) but at the very least, we can get Hmisc in the environment one way or another The other thing to note is that given the prompt I saw, we might want to take out the following from the testthat.R file (and include testthat in the snapshot)
|
@wenyunie yeah, I was running it on my local environment initially to see if I could just add Hmisc to the renv.lock file (if I were to run it on docker I don't believe you would be able to update the renv.lock file right?). I actually wasn't sure why I was prompted to install Also, thanks for clarifying your re: That said, I think you're absolutely right - we don't need to take out those 2 lines since we should be able to bypass it when we take a snapshot |
Teammates, the dockerization part is done, but there is this part about guidelines that we should add, so I invite you guys to walk through the procedures given by these guidelines, and see if the project computational environment is reproduced.
The text was updated successfully, but these errors were encountered: