-
-
Notifications
You must be signed in to change notification settings - Fork 31
Description
First: thanks for spython, it is a great tool to use tested Dockerfiles as another source of working Singularity files!
Here, however, I think I found a lil' bug. I did my best to make it easy to understand and reproduce and hope I did a good job! Thanks for being awesome and cheers, Richel
Expected Behavior
When I use spython to convert a Docker file, I expect the ARGs to be substituted correctly.
For example, when the Docker file starts with (full Docker file below) ...
ARG CUDA_VERSION=11.1.1
ARG OS_VERSION=20.04
FROM nvidia/cuda:${CUDA_VERSION}-cudnn8-devel-ubuntu${OS_VERSION}
... I expect that calling spython to create a Singularity file ...
spython recipe Dockerfile &> Singularity
to start with:
Bootstrap: docker
From: nvidia/cuda:11.1.1-cudnn8-devel-ubuntu20.04
Actual Behavior
However, the top line becomes:
Bootstrap: docker
From: nvidia/cuda:11.1.1-cudnn8-devel-ubuntu11.1.1
It seems that the first argument (CUDA_VERSION) is pasted twice, instead of having on CUDA_VERSION paste and one OS_VERSION paste.
Steps to Reproduce
Unzip this:
spython recipe Dockerfile &> Singularity
It will create a file, Singularity that is the same as the file Singularity_incorrect.
Spython should create a file that is the same as the file Singularity_expected.
Context
- Operating System: Ubuntu 20.04
- singularity version:
singularity --version: singularity version 423bcf8-dirty - spython version:
spython --version: 0.1.18 - python version:
python --version: Python 2.7.18,python3 --version: Python 3.8.10
Failure Logs
N/A
Possible Fix
No idea, need to see where the ARGs are inserted :-)