From 0a0e7ce5f502cdf1e9797daed7d162167075a2c2 Mon Sep 17 00:00:00 2001 From: Boris Pruessmann Date: Sun, 9 May 2021 14:28:54 +0200 Subject: [PATCH 1/3] Documentation for running arm64 builds --- docs/docker_quickstart.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/docker_quickstart.md b/docs/docker_quickstart.md index 8d8582609..ce6d0b503 100644 --- a/docs/docker_quickstart.md +++ b/docs/docker_quickstart.md @@ -67,29 +67,33 @@ Create a new directory and place the [docker-compose file](https://raw.githubuse # image: freqtradeorg/freqtrade:develop_pi ``` -=== "ARM64 (Mac M1)" - Make sure that your docker installation is running in native mode +=== "ARM 64 Systenms (Jetson Nano, Mac M1, Raspberry Pi 4 8GB)" + In case of a Mac M1, make sure that your docker installation is running in native mode ``` bash mkdir ft_userdata cd ft_userdata/ + + # arm64 images are not yer provided via Docker Hub and need to be build locally first. Depending on the device, + # this may take a few minutes (Apple M1) or up to two hours (Raspberry Pi) + git clone https://github.com/freqtrade/freqtrade.git + docker build -f ./freqtrade/docker/Dockerfile.aarch64 -t freqtradeorg/freqtrade:develop_arm64 freqtrade + # Download the docker-compose file from the repository curl https://raw.githubusercontent.com/freqtrade/freqtrade/stable/docker-compose.yml -o docker-compose.yml - # Edit the compose file, uncomment the "build" step and use "./docker/Dockerfile.aarch64" - # Also, change the image name to something of your liking - - # Build the freqtrade image (this may take a while) - docker-compose build - # Create user directory structure docker-compose run --rm freqtrade create-userdir --userdir user_data # Create configuration - Requires answering interactive questions docker-compose run --rm freqtrade new-config --config user_data/config.json ``` - !!! Warning - You should not use the default image name - this can result in conflicting names between local and dockerhub and should therefore be avoided. + + !!! Note "Change your docker Image" + You have to change the docker image in the docker-compose file for your arm64 build to work properly. + ``` yml + image: freqtradeorg/freqtrade:develop_arm64 + ``` The above snippet creates a new directory called `ft_userdata`, downloads the latest compose file and pulls the freqtrade image. The last 2 steps in the snippet create the directory with `user_data`, as well as (interactively) the default configuration based on your selections. From f2add44253f62fe67f10d5cb3c30dd10b649f82c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Pr=C3=BC=C3=9Fmann?= Date: Sun, 9 May 2021 17:27:30 +0200 Subject: [PATCH 2/3] Update docs/docker_quickstart.md Co-authored-by: Matthias --- docs/docker_quickstart.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docker_quickstart.md b/docs/docker_quickstart.md index ce6d0b503..51386a4e3 100644 --- a/docs/docker_quickstart.md +++ b/docs/docker_quickstart.md @@ -74,7 +74,7 @@ Create a new directory and place the [docker-compose file](https://raw.githubuse mkdir ft_userdata cd ft_userdata/ - # arm64 images are not yer provided via Docker Hub and need to be build locally first. Depending on the device, + # arm64 images are not yet provided via Docker Hub and need to be build locally first. Depending on the device, # this may take a few minutes (Apple M1) or up to two hours (Raspberry Pi) git clone https://github.com/freqtrade/freqtrade.git docker build -f ./freqtrade/docker/Dockerfile.aarch64 -t freqtradeorg/freqtrade:develop_arm64 freqtrade From 5e66d37d57927e1275a751ca5a4c78938040b4a0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 12 May 2021 20:07:45 +0200 Subject: [PATCH 3/3] Slightly modify docker instructions for arm64 --- docs/docker_quickstart.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/docs/docker_quickstart.md b/docs/docker_quickstart.md index 51386a4e3..3a85aa885 100644 --- a/docs/docker_quickstart.md +++ b/docs/docker_quickstart.md @@ -67,21 +67,24 @@ Create a new directory and place the [docker-compose file](https://raw.githubuse # image: freqtradeorg/freqtrade:develop_pi ``` -=== "ARM 64 Systenms (Jetson Nano, Mac M1, Raspberry Pi 4 8GB)" +=== "ARM 64 Systenms (Mac M1, Raspberry Pi 4, Jetson Nano)" In case of a Mac M1, make sure that your docker installation is running in native mode + Arm64 images are not yet provided via Docker Hub and need to be build locally first. + Depending on the device, this may take a few minutes (Apple M1) or multiple hours (Raspberry Pi) ``` bash - mkdir ft_userdata - cd ft_userdata/ - - # arm64 images are not yet provided via Docker Hub and need to be build locally first. Depending on the device, - # this may take a few minutes (Apple M1) or up to two hours (Raspberry Pi) + # Clone Freqtrade repository git clone https://github.com/freqtrade/freqtrade.git - docker build -f ./freqtrade/docker/Dockerfile.aarch64 -t freqtradeorg/freqtrade:develop_arm64 freqtrade + cd freqtrade + # Optionally switch to the stable version + git checkout stable - # Download the docker-compose file from the repository - curl https://raw.githubusercontent.com/freqtrade/freqtrade/stable/docker-compose.yml -o docker-compose.yml + # Modify your docker-compose file to enable building and change the image name + # (see the Note Box below for necessary changes) + # Build image + docker-compose build + # Create user directory structure docker-compose run --rm freqtrade create-userdir --userdir user_data @@ -92,7 +95,10 @@ Create a new directory and place the [docker-compose file](https://raw.githubuse !!! Note "Change your docker Image" You have to change the docker image in the docker-compose file for your arm64 build to work properly. ``` yml - image: freqtradeorg/freqtrade:develop_arm64 + image: freqtradeorg/freqtrade:custom_arm64 + build: + context: . + dockerfile: "./docker/Dockerfile.aarch64" ``` The above snippet creates a new directory called `ft_userdata`, downloads the latest compose file and pulls the freqtrade image.