wrightedu / Programmers-Guide-to-the-Galaxy

There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable. There is another theory mentioned, which states that this has already happened. -Douglas Adams
3 stars 7 forks source link

ARM64 architecture for HPC? #135

Open Anjal132 opened 3 weeks ago

Anjal132 commented 3 weeks ago

I have a MacBook M3 pro, arm64 architecture so all my containers are based on the host kernel, however, the HPC is amd64 so I am getting this error.

FATAL: could not open image /home/w255axo/abcd.sif: the image's architecture (arm64) could not run on the host's (amd64)

I am trying to cross-compile amd64 containers in arm64, however, I wanted to ask if there was any other way to solve this issue!

Anjal132 commented 3 weeks ago

Alright, trying to cross compile was a bad idea, however, I did find an easier way.

I will post the solution here incase if anyone runs into this issue later:

Firstly, in your laptop use singularity remote login they will show the link to get the access token, copy paste it in after that you can use remote build command to build your image. singularity build --remote --arch amd64 name.sif name.def the --arch argument determines the container architecture so pay attention to that!

After that, the container .sif will be downloaded to your current folder.