Sometimes you may have a file that you need to get into your Dockerfile which can't be easily, directly downloaded from the web. In this case you can upload the file to a location of your choosing (such as an S3 bucket or even a Domino project) and then download it in the Dockerfile instructions when setting up your compute environment. While the way we handle these files will likely change in the future, for the moment here are some tips on how to do this using a temporarily public Domino project:
(1) Upload the file into a temporary public Domino project under your user.
(2) Open a Jupyter or Jupyterlab workspace and use the terminal within the workspace session to tar up the file. Assuming your file is called myfile.txt this would look like:
tar -cvzf myfile.tar.gz myfile.txt
(3) Note the download path to your compressed file on the web. If your username is myuser and your project name is myproject, then your filepath might be:
You can check the download path by navigating to your file and right-clicking the "Download" button. Copy this URL and remove anything after the .gz (there may be some characters after the extension when you copy the URL such as inline=true -- these are the ones you want to remove).
(4) In your Dockerfile, add the following commands to download your file with
wget and expand it (ensuring you use your own URL for the file and your own filename in place of myfile):
RUN wget -O myfile.txt.tar.gz "https://mydominodomain.com/u/myuser/myproject/raw/5313d9808od/myfile.txt.tar.gz" RUN gunzip -f myfile.txt.tar.gz > myfile.txt.tar RUN tar -xvf myfile.txt.tar
Have any questions or comments about this process? Let us know below.