-
Notifications
You must be signed in to change notification settings - Fork 29
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
Package any script file #8
Comments
I'm not sure about the parameter names for 2, 3 and 5. We could also have
This way we do not have to handle potential conflicts between these options. And in the end, a user can always manually add copy statements anyway. We also need a parameter for the copy destination within the container. My suggestion is Regarding 4: What about a helper function that creates a command instruction from the filename? [I am not sure this even works, my memory might fail me here.] |
@nuest I updated the checklist For copy destination I would use either "payload/" or "/payload/". I did the first thing for now, so that the file lands in the R working directory instead of the file system root. Docker requires a 'folder' to end with a trailing slash, otherwise the data will be written to a file named "payload" and filenames are not preserved. |
From my experience, I think that the restriction working directory = build context suggests itself at for the early stages of development. This is because
|
The following R commands now reproduce the Dockerfile below. All files and folders that are in the same directory as the R script are copied to the image. The directory structure of the workspace is reproduced in the directory 'payload' (default workdir). The cmd parameter makes the same script execute when running the container with default parameters. Any suggestions? R Code Dockerfile:
|
Why the When you switch to the I do not understand the issue with default parameters. Can you give examples? |
|
Well, I figured out by testing that the following Dockerfile does exactly the same job (it also copies the subfolder and resources). Kind of strange, that this simple solution did not ocure to me in first place, even though I read the Dockerfile Documentation...
|
https://sysreqs.r-hub.io/ |
Shall we throw an error if the supplied script does not have an extension ".R" or just assume it is an R script if the extension is unknown? What shall we do if the 'copy' parameter has a list of files and directories, but the R script is not included in this list? Do nothing? |
Regarding extension: assume it is an R script, whatever the extension. Regarding copy: then copy these files and directories. If the user things he knows better, he probably does. |
copy = script
(default) copies the supplied script to the image,copy = script_dir
also copies the script and all files / directories of the same foldercopy
takes a list of files and directories to be copied to the foldercmd
parameter can be set with Cmd_Rscript("path/to/script") resulting toCMD ["Rscript", "--save", "/path/to/Rscript"]
- [ ] 1. Default: execute a script locally and reproduce the session that results by the end of the script- [ ] 2.copy_script = TRUE
also copies the script- [ ] 3.copy_parent = TRUE
also copies the script and all files / directories of the same folder- [ ] 4.
batch_exec = TRUE
also copies script and sets CMD instruction toCMD ["Rscript", "--save", "/path/to/Rscript"]
- [ ] 5.copy_files
takes a list of files and directories to be copied to the folder- [ ] 6. Test 1-5 with test scriptsIssues (to be discussed later)
The text was updated successfully, but these errors were encountered: