Singularity Containers on Apple M1 (ARM64)

Overview

Singularity Containers on Apple M1 (ARM64)

This is a repository containing a ready-to-use environment for singularity in arm64 (M1). It has been prepared specifically for the SKA SRC training on containers event and allows you the use of singularity containers with Apple's M1 architecture.

Install UTM for Apple M1

Click here: UTM for M1

Download it and then install it.

Download and unzip the pre-build UTM image ready to use

Click here to download this image.

This is an image created using Ubuntu 20.04 for ARM 64 Architecture.

After that, unzip the file downloaded (from 3GB to 6GB).

Import UTM image from the UTM application

Open UTM application, then click on the menu "File" and then "Import", select the image skatraining-singularity.utm.

Import image

Start the image

Click on the recently imported image and then click > to start.

After that you will see login screen.

Use the following credentials:

  • username: ska
  • passwoord: ska

Connect to the environmente using SSH

Connecting via SSH is a better option than directly using the shell that appears from the screen when starting the Virtual Machine.

To do that, open a Terminal in your host system and type the following:

ssh -p 22022 ska@localhost

and you have to use the following credentials:

  • username: ska
  • passwoord: ska

Change keyboard layout

Because the image was built on my machine, in the installation I used my local keyboard layout, so to use your own keyboard layout (FR, DE, UK, ...), to do it you can type the following:

sudo dpkg-reconfigure keyboard-configuration

And then select your keyboard layout. Then you have to reboot the virtual machine by typing: sudo reboot

Building you own container on singularity for M1

Note you can use all Singularity and Docker containers from their Cloud Hubs, but there must be containers on the ARM64 architecture. Many of the containers are already ported to ARM64, but there are still many that have not been migrated to this new architecture.

Here we guide you through the process of creating your own container that will work perfectly for ARM64 architectures.

First, clone this repository:

git clone https://github.com/manuparra/singularitycontainers-on-m1-arm64.git

Then type:

cd singularitycontainers-on-m1-arm64

After that you can build an example container (see the code here ):

sudo singularity build lolcow.sif lolcow.def

After this process you will see a file named: lolcow.sif, now is time to run it:

singularity run lolcow.sif 

You will see the following:

 _________________________________________
/ Best of all is never to have been born. \
\ Second best is to die soon.             /
 -----------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||


The next step is to build a container that has more functionalities, in this case we are going to create a container that we can use later to improve it and create, for example our python code encapsulated in containers.

First, build the container (you can see how it is created from a definition file here):

sudo singularity build myplottingapp.sif myplottingapp.def 

After this process your container is ready to use by typing:

singularity run myplottingapp.sif testfile.png

Now, you can see a file named testfile.png.

-----------------------------------------------
SKA training: Git and Containers
Plot generated in testfile.png file.
-----------------------------------------------

Another way to interact with the container is to connect to the container and open a shell, for this, we can use the following:

singularity shell myplottingapp.sif

Then, if you want to go back to the host, type: exit

Acknowledgments

(Mateusz Malenta)[https://www.linkedin.com/in/mmalenta/?originalSubdomain=uk] and Alex Clarke

You might also like...
Download Apple Music Cover Artwork in the best Quality by providing an Apple Music Link. It downloads the jpg, png and webp version since they often differ from another.
Download Apple Music Cover Artwork in the best Quality by providing an Apple Music Link. It downloads the jpg, png and webp version since they often differ from another.

amogus.py - Version 0.0.5 amogus - Apple Music Hi-Res Artwork Fetcher this is my first real python tool so sorry if its bad amogus is a Python script

A Python Library for Simple Models and Containers Persisted in Redis

Redisco Python Containers and Simple Models for Redis Description Redisco allows you to store objects in Redis. It is inspired by the Ruby library Ohm

Universal 1d/2d data containers with Transformers functionality for data analysis.
Universal 1d/2d data containers with Transformers functionality for data analysis.

XPandas (extended Pandas) implements 1D and 2D data containers for storing type-heterogeneous tabular data of any type, and encapsulates feature extra

jupyter/ipython experiment containers for GPU and general RAM re-use
jupyter/ipython experiment containers for GPU and general RAM re-use

ipyexperiments jupyter/ipython experiment containers and utils for profiling and reclaiming GPU and general RAM, and detecting memory leaks. About Thi

Discord Bot that leverages the idea of nested containers using podman, runs untrusted user input, executes Quantum Circuits, allows users to refer to the Qiskit Documentation, and provides the ability to search questions on the Quantum Computing StackExchange.
Discord Bot that leverages the idea of nested containers using podman, runs untrusted user input, executes Quantum Circuits, allows users to refer to the Qiskit Documentation, and provides the ability to search questions on the Quantum Computing StackExchange.

Discord Bot that leverages the idea of nested containers using podman, runs untrusted user input, executes Quantum Circuits, allows users to refer to the Qiskit Documentation, and provides the ability to search questions on the Quantum Computing StackExchange.

Palestra sobre desenvolvimento seguro de imagens e containers para a DockerCon 2021 sala Brasil
Palestra sobre desenvolvimento seguro de imagens e containers para a DockerCon 2021 sala Brasil

Segurança de imagens e containers direto na pipeline Palestra sobre desenvolvimento seguro de imagens e containers para a DockerCon 2021 sala Brasil.

Torch Containers simplified in PyTorch
Torch Containers simplified in PyTorch

pytorch-containers This repository aims to help former Torchies more seamlessly transition to the "Containerless" world of PyTorch by providing a list

Containers And REST APIs Workshop
Containers And REST APIs Workshop

Containers & REST APIs Workshop Containers vs Virtual Machines Ferramentas Podman: https://podman.io/ Docker: https://www.docker.com/ IBM CLI: https:/

Build and run Docker containers leveraging NVIDIA GPUs
Build and run Docker containers leveraging NVIDIA GPUs

NVIDIA Container Toolkit Introduction The NVIDIA Container Toolkit allows users to build and run GPU accelerated Docker containers. The toolkit includ

Dockerized service to backup all running database containers

Docker Database Backup Dockerized service to automatically backup all of your database containers. Docker Image Tags: docker.io/jandi/database-backup

Hatch plugin for Docker containers

hatch-containers CI/CD Package Meta This provides a plugin for Hatch that allows

management tool for systemd-nspawn containers

nspctl nspctl, management tool for systemd-nspawn containers. Why nspctl? There are different tools for systemd-nspawn containers. You can use native

This is a tool to develop, build and test PHP extensions in Docker containers.

Develop, Build and Test PHP Extensions This is a tool to develop, build and test PHP extensions in Docker containers. Installation Clone this reposito

DAMPP (gui) is a Python based program to run simple webservers using MySQL, Php, Apache and PhpMyAdmin inside of Docker containers.

DAMPP (gui) is a Python based program to run simple webservers using MySQL, Php, Apache and PhpMyAdmin inside of Docker containers.

About A python based Apple Quicktime protocol,you can record audio and video from real iOS devices

介绍 本应用程序使用 python 实现,可以通过 USB 连接 iOS 设备进行屏幕共享 高帧率(30〜60fps) 高画质 低延迟(200ms) 非侵入性 支持多设备并行 Mac OSX 安装 python =3.7 brew install libusb pkg-config 如需使用 g

OHLC Average Prediction of Apple Inc. Using LSTM Recurrent Neural Network
OHLC Average Prediction of Apple Inc. Using LSTM Recurrent Neural Network

Stock Price Prediction of Apple Inc. Using Recurrent Neural Network OHLC Average Prediction of Apple Inc. Using LSTM Recurrent Neural Network Dataset:

Bad Apple printed out on the console with Python!

bad-apple Bad Apple printed out on the console with Python! Preface A word of disclaimer, while the final code is somewhat original, this project is a

Bad Apple printed out on the console with Python!

Bad Apple printed out on the console with Python!

Research shows Google collects 20x more data from Android than Apple collects from iOS. Block this non-consensual telemetry using pihole blocklists.

pihole-antitelemetry Research shows Google collects 20x more data from Android than Apple collects from iOS. Block both using these pihole lists. Proj

Comments
  • ssh connection refused

    ssh connection refused

    Each time I try to ssh to the IMAGE, I receive the error prompt below "ssh: connect to host localhost port 2202:Connection refused"

    I have the verified that ssh service is running and have been able to connect to the host from the IMAGE.

    A verbose run with "ssh -v ..." presents a log with below

    "nicholas@Nicholass-MacBook-Pro N ssh -v ska@localhost

    8.6p1, LibreSSL 3.3.6 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/e matched no

    files debug1: /etc/ssh/ssh_config line 54: Applying options for

    debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling

    debug1: Connecting to localhost port 22. debug1: Connection established.

    debug1: identity file /Users/nicholas/.ssh/id_rsa type -1

    debug1: identity file /Users/nicholas/.ssh/id_rsa-cert type -1

    debug1: identity file /Users/nicholas/.ssh/id_dsa type -1 debug1: identity file /Users/nicholas/.ssh/id_dsa-cert type -1

    debug1: identity file /Users/nicholas/.ssh/id_ecdsa type -1

    debug1: identity file /Users/nicholas/.ssh/id_ecdsa-cert type -1 debug1: identity file /Users/nicholas/.ssh/id_ecdsa_sk type -1 debug1: identity file /Users/nicholas/.ssh/id_ecdsa_sk-cert type -1

    debug1: identity file /Users/nicholas/.ssh/id_ed25519 type -1

    debug1: identity file /Users/nicholas/.ssh/id_ed25519-cert type -1 debug1: identity file /Users/nicholas/.ssh/id_ed25519_sk type -1

    debug1: identity file /Users/nicholas/.ssh/id_ed25519_sk-cert type -1

    debug1: identity file /Users/nicholas/.ssh/id_xmss type -1

    debug1: identity file /Users/nicholas/.ssh/id_xass-cert type -1 debug1: Local version string SSH-2.8-OpenSSH_8.6

    kex_exchange_identification: Connection closed by remote host

    Connection closed by ::1 port 22 Ck yinicholas@Nicholass-MacBook-Pro-% ssh -v -p 2282 ska@localhost

    OpenSSH 8.6p1, LibreSSL 3.3.6

    debug1: Reading configuration data /etc/ssh/ssh_config

    debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/ matched no

    files

    debug1: /etc/ssh/ssh_config line 54: Applying options for debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling

    debug1: Connecting to localhost port 2282. ssh: connect to host localhost port 2202: Connection refused)"

    Please help

    opened by dnharry 0
Owner
Manuel Parra
Researcher @CERN Large-scale data processing. Big-Data & Machine Learning Engineer. Software Architect & Developer. Ph.D. candidate #UGR
Manuel Parra
Palestra sobre desenvolvimento seguro de imagens e containers para a DockerCon 2021 sala Brasil

Segurança de imagens e containers direto na pipeline Palestra sobre desenvolvimento seguro de imagens e containers para a DockerCon 2021 sala Brasil.

Fernando Guisso 10 May 19, 2022
management tool for systemd-nspawn containers

nspctl nspctl, management tool for systemd-nspawn containers. Why nspctl? There are different tools for systemd-nspawn containers. You can use native

Emre Eryilmaz 5 Nov 27, 2022
About A python based Apple Quicktime protocol,you can record audio and video from real iOS devices

介绍 本应用程序使用 python 实现,可以通过 USB 连接 iOS 设备进行屏幕共享 高帧率(30〜60fps) 高画质 低延迟(<200ms) 非侵入性 支持多设备并行 Mac OSX 安装 python >=3.7 brew install libusb pkg-config 如需使用 g

YueC 124 Nov 30, 2022
Bad Apple printed out on the console with Python!

bad-apple Bad Apple printed out on the console with Python! Preface A word of disclaimer, while the final code is somewhat original, this project is a

CalvinLoke 186 Dec 1, 2022
🍏 Make Thinc faster on macOS by calling into Apple's native Accelerate library

?? Make Thinc faster on macOS by calling into Apple's native Accelerate library

Explosion 81 Nov 26, 2022
Process RunGap output file of a workout and load data into Apple Numbers Spreadsheet and my website with API calls

BSD 3-Clause License Copyright (c) 2020, Mike Bromberek All rights reserved. ProcessWorkout Exercise data is exported in JSON format to iCloud using

Mike Bromberek 1 Jan 3, 2022
Automatically skip sponsor segments in YouTube videos playing on Apple TV.

iSponsorBlockTV Skip sponsor segments in YouTube videos playing on an Apple TV. This project is written in asycronous python and should be pretty quic

David 64 Dec 17, 2022
Apple Store Stock Notifier monitors the availability of selected Apple devices in selected Apple stores, and sends you a notification when devices are available!

Apple Store Stock Notifier This software will immediately send you a notification via Telegram when one of your coveted Apple Devices is available in

Floris-Jan Willemsen 25 Dec 5, 2022
The earliest beta version of pytgcalls on Linux x86_64 and ARM64! Use in production at your own risk!

Public beta test. Use in production at your own risk! tgcalls - a python binding for tgcalls (c++ lib by Telegram); pytgcalls - library connecting pyt

Il'ya 21 Jan 13, 2022