Is there a solution to make this docker image https://hub.docker.com/r/ibmcom/mq run on Apple M1 chips? For Intel chips, I was able to run this image by:
docker run -e LICENSE=accept -e MQ_QMGR_NAME=QM1 -p 1414:1414 -p 9443:9443 ibmcom/mq
Is there a custom build or an official IBM plan to create an Apple M1 compatible version of this image?
This has already been requested from IBM, you can view and vote on it here.
The only way I got this to work is to emulate Ubuntu Server with UTM, and install docker and IBMMQ image there. Then you can just connect to the docker container through UTM from your host machine. Not the greatest solution, but atleast a workaround for now.
I don't have an M1 mac, so I can't test it but according to this, it says you can try adding --platform linux/amd64.
If that doesn't work then you'll have to build your own (you can base it off the Dockerfile they provided in their GitHub repo. The ones from the official Dockerhub only supports amd64 and s390x architectures.
Related
Image built on Mac OSX with M1 processor, deployed to an EC2 instance. But when scripts are run it yields the error:
standard_init_linux.go:219: exec user process caused: exec format error
Elsewhere on Stackoverflow, this is explained as a mismatch of OS architecture. Sure enough running "uname -m" on EC2 instance shows it to be x86_64, and "docker image inspect" shows the container to have architecture arm64.
Here's what I don't understand. "uname -m" on my Mac shows that to be x86_64 too. So how does the container inherit a different architecture?
More significantly, how do I build an image on my Mac that I can run on EC2?
Docker file is simply
FROM python
WORKDIR /
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY src /src
with src containing, currently, some simple python scripts, executed thus:
docker run container/name python test.py
This works fine on my Mac, but gives the error above when executed on AWS.
OK. Here's what's happening. My Mac has the new M1 chip and I'm running the Tech Preview version of Docker Desktop. Under the hood the chip has the arm64 architecture, but interrogating it through iTerm and VSCode it claims to be x86_64 instead, hence my confusion when I posted the question. This is probably because both those apps are being quietly run through an Intel simulator behind the scenes and that's what's responding to the uname command.
However, because the processor is really arm64, that's the base architecture when I pull Python images from Docker (I tried lots of different flavours nd version of Python - all with the same results).
To force use of an amd64 AWS-compatible image I changed the first line of the Dockerfile to:
FROM --platform=linux/x86-64 python.
When containers from this image are run on the Mac that causes a warning
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
but it's just that, a warning, and the script runs (presumably by redirecting back through the Intel simulator. The scripts now run without problem (or warning) on the EC2 instance.
I'm not sure why you're getting this error, but there is a nice way to get around it if you'd like and if you don't mind your code and images being public. I'm guessing that this is just home-stuff anyway, so it might not be too bad.
Put your code in github.
Configure a repository on
hub.docker.com for your image and configure automatic builds from
github
ssh onto your ec2 instance and pull your image directly
from docker hub
An alternative is to start with step 1, then log into your ec2 using ssh and clone the repo on that machine. You can then build it directly on a real linux machine (your osx machine doesn't run Linux, which is an instant mismatch with docker). If you build it on the server you should be able to run it there with no problems.
Try to run with CMD ["lscpu"] or something related like cat /proc/cpuinfo in the container, compare architectures
Another thing: you might be pulling arm architecture of python image when building, and try to run it on x86_64 (EC2)
In addition to what has been shared above, you could also Build a multi-arch image with Buildx.
Basically, The recent Docker versions come with a CLI command called buildx. You can use the buildx command on Docker Desktop for Mac and Windows to build multi-arch images, link them together with a manifest file, and push them all to a registry using a single command.
Here is what works for me:
Create a new builder which gives access to the new
multi-architecture features.
docker buildx create --name mybuilder --use
Build the Dockerfile with buildx, passing the list of architectures to build for:
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t username/demo:latest --push .
=> pushing layers 2.7s
=> pushing manifest for docker.io/username/demo:latest 2.2
Where, username is a valid Docker username.
Notes:
The --platform flag informs buildx to generate Linux images for AMD 64-bit, Arm 64-bit, and Armv7 architectures.
The --push flag generates a multi-arch manifest and pushes all the images to Docker Hub.
To inspect the image use the below command
docker buildx imagetools inspect username/demo:latest
I installed docker with the instructions here, downloading from docker-hub
https://docs.docker.com/docker-for-mac/install/
But when I run docker-compose I get this error
pyenv: docker-compose: command not found
The `docker-compose' command exists in these Python versions:
3.6.5/envs/myenv
Also, docker-compose is available under /Users
which docker-compose
/Users/<username>/.pyenv/shims/docker-compose
In this link says, docker-compose for mac need not be installed explicitly as it is part of docker for desktop mac.
https://docs.docker.com/compose/install/
Is something wrong with my installation?
I ran into the same issue on macOS today. Turned out that you need to run the installed app once, it does some additional downloading and setup. That setup includes setting up your path variables.
docker-compose is a utility that is now a parameter in mac docker
so instead of docker-compose up, its now docker compose up
if you install docker from official website then docker-compose will come along with that for mac so need to either upgrade and documentation is present there.
How to install kubeadm for Kubernetes in macOS. When tempting to use
brew install kubeadm
I get this error
Error: No available formula with the name "kubeadm"
==> Searching for a previously deleted formula (in the last month)..
NB : In macOS I can't use apt-get
Not sure about MAC OS
The supported platforms on their list are:
Ubuntu 16.04+
Debian 9
CentOS 7
RHEL 7
Fedora 25/26 (best-effort)
HypriotOS v1.0.1+
Container Linux (tested with 1800.6.0)
https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/
KubeAdm is not for Desktop local environment.
You can install Docker For MAC that will install the minikube environment for you.
You are not able to directly install kubeadm and set up kubernetes cluster locally on MAC OS because of docker.
Unfortunately for MAC we should have VirtualBox where Docker will run + boot2docker.
And the best option here(as #Ijaz Ahmad Khan mentioned) is to use Docker Desktop for Mac
You can use below guide to correctly configure your cluster: How to Install Kubernetes on Mac
At the moment kubernetes server components doesn't ship any Darwin OS(MAC OS) binaries so the control plane component can't directly run under MACOS. Although they ship kubectl for Darwin OS which can use any API Server to connect to and deploy the applications.
However I was able to run the Hyperkube Binary inside the container that can support the all control plane components but this would all be under docker container so that isn't essentially a Darwin OS supported Control Plane.
You can try this if you just want to use local installs:
https://github.com/kubernetes/kubernetes/tree/master/cluster/images/hyperkube
also If you are really looking to do everything in MAC , then possibly Install Hyperkit driver and that will allow you do pretty much the same thing to pull up the control plane images and built it up.
Damn, since this is 3 years old question, might be too late but you can use cluster on MacOS with using brew install kind.
Kind is short for Kubernetes IN Docker.
Here the documentation on more details about kind.
https://kind.sigs.k8s.io/
It is possible to install Microsoft CNTK on a macbook? I have OS X El Capitan. The official Microsoft documentation at https://github.com/Microsoft/CNTK/wiki/Setup-CNTK-on-your-machine doesn't provide any information for mac users.
Thank you
As of June 2017, you can only run CNTK on OSX using Docker (which will run a Linux container)
Documentation from Microsoft is available here: https://learn.microsoft.com/en-us/cognitive-toolkit/CNTK-Docker-Containers
If you want to run the CPU version of CNTK (as opposed to a GPU enabled) you'll need to pull a particular version of the docker container. See: https://hub.docker.com/r/microsoft/cntk/
I recommend using the following for CPU CNTK:
docker pull microsoft/cntk:2.0-cpu-python3.5
Once you've pulled the container above, you can use Jupyter Notebooks to look at tutorials etc:
First, run the container:
docker run -d -p 8888:8888 --name cntk-jupyter-notebooks -t microsoft/cntk:2.0-cpu-python3.5
Then run this command:
docker exec -it cntk-jupyter-notebooks bash -c "source /cntk/activate-cntk && jupyter-notebook --no-browser --port=8888 --ip=0.0.0.0 --notebook-dir=/cntk/Tutorials --allow-root"
You'll want to access the shell to run CNTK commands. You can attach a bash shell using docker.
Get your container id
docker ps
Then attach a shell
docker exec -it <container_id> bash
While it might not be supported on Mac directly, you can always use a virtual machine to get around.
You can setup docker in your local environment.
https://docs.docker.com/docker-for-mac/
Follow its documentations on how to install on Docker
https://github.com/Microsoft/CNTK/wiki/CNTK-Docker-Containers
We currently support both Linux and Windows. Mac support is on our ToDo or would be interested in community contribution.
I'm currently building CNTK on a linux machine without root access, installing every dependency with linuxbrew (a fork of homebrew). So I think is possible to build on MacOS natively. You can try building it from source with CNTK linux manual to build from source. Let me know if you have any issue.
How can i install RethinkDB on a Synology NAS?
Synology 's OS has no apt-get.
https://www.rethinkdb.com/docs/install/
greets
philipp
You can build it yourself from source.
I think that you can use static linked build to run an app on Synology NAS. For instance, we can take the package of Alpine Linux, since it is static link build. Someone did some work of that: https://github.com/rethinkdb/rethinkdb/issues/4437
This is an old question, but I'll post an updated answer. Nowadays, most Synology NAS devices can run software using Docker.
As per RethinkDB documentation, you can find an official image of RethinkDB on the Docker Hub.
You can follow this guide to install RethinkDB on your Synology NAS: https://tutorialsight.com/how-to-install-rethinkdb-on-your-synology-nas/