SimpleContainerGenerator Error

I’m trying to generate a Docker image so I can turn that into a Singularity image using SimpleContainerGenerator. I unfortunately get an error. I would love to fix this if anyone has advice!

I have the following file to generate the container:

import SimpleContainerGenerator 

mkpath("hedonic_gpu")

cd("hedonic_gpu")

pkgs = [
        "CSV", 
        "Tables", 
        "StatsBase", 
        "FileIO", 
        "HTTP", 
        "DataFrames", 
        "Parameters", 
        "Flux", 
        "Metalhead", 
        "BSON", 
        "Serialization", 
        "Random", 
        "Images", 
        "Dates", 
        "Tables",
        ]

julia_version = v"1.7.2"

SimpleContainerGenerator.create_dockerfile(pkgs; output_directory = pwd(), julia_version = julia_version)

run(`docker build -t austinbean/hedonic_gpu .`)

The error that I get is:

=> ERROR [ 27/107] RUN cd /tmp; JULIA_DEPOT_PATH=/tmp/simplecontainergenerator-containers-build-depot /opt/bin/julia -e 'import InteractiveUtils; InteractiveUtils.versioninfo(; verbose=true)'    0.2s
------
 > [ 27/107] RUN cd /tmp; JULIA_DEPOT_PATH=/tmp/simplecontainergenerator-containers-build-depot /opt/bin/julia -e 'import InteractiveUtils; InteractiveUtils.versioninfo(; verbose=true)':
#30 0.179 qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
------
executor failed running [/bin/sh -c cd /tmp; JULIA_DEPOT_PATH=/tmp/simplecontainergenerator-containers-build-depot /opt/bin/julia -e 'import InteractiveUtils; InteractiveUtils.versioninfo(; verbose=true)']: exit code: 255
ERROR: LoadError: failed process: Process(`docker build -t austinbean/hedonic_gpu .`, ProcessExited(1)) [1]

But if I execute the last command in a terminal I don’t get an error:

austinbean@MacBook-Pro % julia -e 'import InteractiveUtils; InteractiveUtils.versioninfo(; verbose=true)'
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.2.0)
  uname: Darwin 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000 arm64 arm
  CPU: Apple M1 Pro:
              speed         user         nice          sys         idle          irq
       #1    24 MHz     245440 s          0 s     215388 s    2165165 s          0 s
       #2    24 MHz     244504 s          0 s     207366 s    2174115 s          0 s
       #3    24 MHz     167468 s          0 s      34087 s    2424430 s          0 s
       #4    24 MHz     110018 s          0 s      20768 s    2495199 s          0 s
       #5    24 MHz      49449 s          0 s       8580 s    2567956 s          0 s
       #6    24 MHz      18879 s          0 s       6510 s    2600597 s          0 s
       #7    24 MHz       9844 s          0 s       3164 s    2612977 s          0 s
       #8    24 MHz       5922 s          0 s       1896 s    2618167 s          0 s

  Memory: 32.0 GB (1112.5625 MB free)
  Uptime: 262598.0 sec
  Load Avg:  3.44775390625  3.18603515625  2.79541015625
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, cyclone)
Environment:
  XPC_FLAGS = 0x0
  PATH = /Users/austinbean/opt/anaconda3/bin:/Users/austinbean/opt/anaconda3/condabin:/Applications/Julia-1.7.app/Contents/Resources/julia/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Library/Apple/usr/bin:/usr/local/git/bin
  TERM = xterm
  HOME = /Users/austinbean
  HOMEBREW_PREFIX = /opt/homebrew
  HOMEBREW_CELLAR = /opt/homebrew/Cellar
  HOMEBREW_REPOSITORY = /opt/homebrew
  MANPATH = /opt/homebrew/share/man::
  INFOPATH = /opt/homebrew/share/info: