From a95dbdbde4a2706a19e3edf4190695b644902a6b Mon Sep 17 00:00:00 2001 From: HumanBot Date: Sat, 19 Sep 2020 14:31:23 -0400 Subject: [PATCH 01/26] Added 1M and 1y timeframes Huobi Pro allows monthly and yearly data downloading --- freqtrade/commands/cli_options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/commands/cli_options.py b/freqtrade/commands/cli_options.py index 8eb5c3ce8..458aae325 100644 --- a/freqtrade/commands/cli_options.py +++ b/freqtrade/commands/cli_options.py @@ -375,7 +375,7 @@ AVAILABLE_CLI_OPTIONS = { help='Specify which tickers to download. Space-separated list. ' 'Default: `1m 5m`.', choices=['1m', '3m', '5m', '15m', '30m', '1h', '2h', '4h', - '6h', '8h', '12h', '1d', '3d', '1w'], + '6h', '8h', '12h', '1d', '3d', '1w','1M', '1y'], default=['1m', '5m'], nargs='+', ), From f51f445011f216dc491faf33cb659908d6b37263 Mon Sep 17 00:00:00 2001 From: HumanBot Date: Sat, 19 Sep 2020 14:45:36 -0400 Subject: [PATCH 02/26] 1M and 1y timeframes added Huobi Pro timeframes added --- docs/data-download.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/data-download.md b/docs/data-download.md index 9f0486262..63a56959f 100644 --- a/docs/data-download.md +++ b/docs/data-download.md @@ -22,7 +22,7 @@ usage: freqtrade download-data [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-p PAIRS [PAIRS ...]] [--pairs-file FILE] [--days INT] [--timerange TIMERANGE] [--dl-trades] [--exchange EXCHANGE] - [-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...]] + [-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} ...]] [--erase] [--data-format-ohlcv {json,jsongz,hdf5}] [--data-format-trades {json,jsongz,hdf5}] @@ -41,7 +41,7 @@ optional arguments: as --timeframes/-t. --exchange EXCHANGE Exchange name (default: `bittrex`). Only valid if no config is provided. - -t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...], --timeframes {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...] + -t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} ...], --timeframes {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} ...] Specify which tickers to download. Space-separated list. Default: `1m 5m`. --erase Clean all existing data for the selected @@ -104,7 +104,7 @@ usage: freqtrade convert-data [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-p PAIRS [PAIRS ...]] --format-from {json,jsongz,hdf5} --format-to {json,jsongz,hdf5} [--erase] - [-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...]] + [-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} ...]] optional arguments: -h, --help show this help message and exit @@ -117,7 +117,7 @@ optional arguments: Destination format for data conversion. --erase Clean all existing data for the selected exchange/pairs/timeframes. - -t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...], --timeframes {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...] + -t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} ...], --timeframes {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} ...] Specify which tickers to download. Space-separated list. Default: `1m 5m`. From c349499985714ac6c6616f7a4b8e64816f994bfb Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 11:18:45 +0200 Subject: [PATCH 03/26] Also add 2w (supported by kraken) --- docs/data-download.md | 8 ++++---- freqtrade/commands/cli_options.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/data-download.md b/docs/data-download.md index 63a56959f..3a7e47c8b 100644 --- a/docs/data-download.md +++ b/docs/data-download.md @@ -22,7 +22,7 @@ usage: freqtrade download-data [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-p PAIRS [PAIRS ...]] [--pairs-file FILE] [--days INT] [--timerange TIMERANGE] [--dl-trades] [--exchange EXCHANGE] - [-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} ...]] + [-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} ...]] [--erase] [--data-format-ohlcv {json,jsongz,hdf5}] [--data-format-trades {json,jsongz,hdf5}] @@ -41,7 +41,7 @@ optional arguments: as --timeframes/-t. --exchange EXCHANGE Exchange name (default: `bittrex`). Only valid if no config is provided. - -t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} ...], --timeframes {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} ...] + -t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} ...], --timeframes {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} ...] Specify which tickers to download. Space-separated list. Default: `1m 5m`. --erase Clean all existing data for the selected @@ -104,7 +104,7 @@ usage: freqtrade convert-data [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-p PAIRS [PAIRS ...]] --format-from {json,jsongz,hdf5} --format-to {json,jsongz,hdf5} [--erase] - [-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} ...]] + [-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} ...]] optional arguments: -h, --help show this help message and exit @@ -117,7 +117,7 @@ optional arguments: Destination format for data conversion. --erase Clean all existing data for the selected exchange/pairs/timeframes. - -t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} ...], --timeframes {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M,1y} ...] + -t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} ...], --timeframes {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,2w,1M,1y} ...] Specify which tickers to download. Space-separated list. Default: `1m 5m`. diff --git a/freqtrade/commands/cli_options.py b/freqtrade/commands/cli_options.py index 458aae325..81b8de1af 100644 --- a/freqtrade/commands/cli_options.py +++ b/freqtrade/commands/cli_options.py @@ -375,7 +375,7 @@ AVAILABLE_CLI_OPTIONS = { help='Specify which tickers to download. Space-separated list. ' 'Default: `1m 5m`.', choices=['1m', '3m', '5m', '15m', '30m', '1h', '2h', '4h', - '6h', '8h', '12h', '1d', '3d', '1w','1M', '1y'], + '6h', '8h', '12h', '1d', '3d', '1w', '2w', '1M', '1y'], default=['1m', '5m'], nargs='+', ), From b72cccae3c04e279f9f1e09580789576f7721e79 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 13:09:34 +0200 Subject: [PATCH 04/26] Add note about download-data in combination with startup period closes #2673 --- docs/data-download.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/data-download.md b/docs/data-download.md index 3a7e47c8b..e9c5c1865 100644 --- a/docs/data-download.md +++ b/docs/data-download.md @@ -71,6 +71,11 @@ Common arguments: ``` +!!! Note "Startup period" + `download-data` is a strategy-independent command. The idea is to download a big chunk of data once, and then iteratively increase the amount of data stored. + + For that reason, `download-data` does not care about the "startup-period" defined in a strategy. It's up to the user to download additional days if the backtest should start at a specific point in time (while respecting startup period). + ### Data format Freqtrade currently supports 3 data-formats for both OHLCV and trades data: From 8ff7ce8b17ad8b9df409f64a314e99ec44d67099 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 11:40:16 +0000 Subject: [PATCH 05/26] Introduce devcontainer --- .devcontainer/devcontainer.json | 38 ++++++++++++++++++++++++++++++++ .devcontainer/docker-compose.yml | 10 +++++++++ 2 files changed, 48 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/docker-compose.yml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..916f4e911 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,38 @@ +{ + "name": "freqtrade Develop", + + // Update the 'dockerComposeFile' list if you have more compose files or use different names. + // The .devcontainer/docker-compose.yml file contains any overrides you need/want to make. + "dockerComposeFile": [ + "docker-compose.yml" + // "docker-compose.vscode.yml" + ], + + "service": "freqtrade_develop", + + // The optional 'workspaceFolder' property is the path VS Code should open by default when + // connected. This is typically a file mount in .devcontainer/docker-compose.yml + "workspaceFolder": "/freqtrade/", + + "settings": { + "terminal.integrated.shell.linux": null + }, + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [], + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Uncomment the next line if you want start specific services in your Docker Compose config. + // "runServices": [], + + // Uncomment the next line if you want to keep your containers running after VS Code shuts down. + // "shutdownAction": "none", + + // Uncomment the next line to run commands after the container is created - for example installing curl. + // "postCreateCommand": "sudo apt-get update && apt-get install -y git", + + // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "ftuser" +} diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 000000000..d5927c4a9 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,10 @@ +--- +version: '3' +services: + freqtrade_develop: + build: + context: .. + dockerfile: "Dockerfile.develop" + volumes: + - ..:/freqtrade:cached + command: /bin/sh -c "while sleep 1000; do :; done" From 7ead4f9fa3625dc06872494c34a7c198bd264e41 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 14:16:36 +0200 Subject: [PATCH 06/26] Update devcontainer settings --- .devcontainer/devcontainer.json | 63 +++++++++++++++++++------------- .devcontainer/docker-compose.yml | 9 ++++- 2 files changed, 45 insertions(+), 27 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 916f4e911..7a5e43cf1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,38 +1,49 @@ { - "name": "freqtrade Develop", + "name": "freqtrade Develop", - // Update the 'dockerComposeFile' list if you have more compose files or use different names. - // The .devcontainer/docker-compose.yml file contains any overrides you need/want to make. - "dockerComposeFile": [ - "docker-compose.yml" - // "docker-compose.vscode.yml" - ], + // Update the 'dockerComposeFile' list if you have more compose files or use different names. + // The .devcontainer/docker-compose.yml file contains any overrides you need/want to make. + "dockerComposeFile": [ + "docker-compose.yml" + // "docker-compose.vscode.yml" + ], - "service": "freqtrade_develop", + "service": "ft_vscode", - // The optional 'workspaceFolder' property is the path VS Code should open by default when - // connected. This is typically a file mount in .devcontainer/docker-compose.yml - "workspaceFolder": "/freqtrade/", + // The optional 'workspaceFolder' property is the path VS Code should open by default when + // connected. This is typically a file mount in .devcontainer/docker-compose.yml + "workspaceFolder": "/freqtrade/", - "settings": { - "terminal.integrated.shell.linux": null - }, + "settings": { + "terminal.integrated.shell.linux": "/bin/bash", + "editor.insertSpaces": true, + "files.trimTrailingWhitespace": true, + "[markdown]": { + "files.trimTrailingWhitespace": false, + }, + "python.pythonPath": "/usr/local/bin/python", + }, - // Add the IDs of extensions you want installed when the container is created. - "extensions": [], + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance", + "davidanson.vscode-markdownlint", + "ms-azuretools.vscode-docker", + ], - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], - // Uncomment the next line if you want start specific services in your Docker Compose config. - // "runServices": [], + // Uncomment the next line if you want start specific services in your Docker Compose config. + // "runServices": [], - // Uncomment the next line if you want to keep your containers running after VS Code shuts down. - // "shutdownAction": "none", + // Uncomment the next line if you want to keep your containers running after VS Code shuts down. + // "shutdownAction": "none", - // Uncomment the next line to run commands after the container is created - for example installing curl. - // "postCreateCommand": "sudo apt-get update && apt-get install -y git", + // Uncomment the next line to run commands after the container is created - for example installing curl. + // "postCreateCommand": "sudo apt-get update && apt-get install -y git", - // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. - "remoteUser": "ftuser" + // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "ftuser" } diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index d5927c4a9..93ffee309 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -1,10 +1,17 @@ --- version: '3' services: - freqtrade_develop: + ft_vscode: build: context: .. dockerfile: "Dockerfile.develop" volumes: - ..:/freqtrade:cached + - freqtrade-vscode-server:/home/ftuser/.vscode-server + - freqtrade-bashhistory:/home/ftuser/commandhistory + command: /bin/sh -c "while sleep 1000; do :; done" + +volumes: + freqtrade-vscode-server: + freqtrade-bashhistory: From 20e5c1b3885229af7fc1479346953404d7dabc2e Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 12:16:58 +0000 Subject: [PATCH 07/26] Update Developer documentation related to docker --- docs/developer.md | 44 ++++++-------------------------------------- 1 file changed, 6 insertions(+), 38 deletions(-) diff --git a/docs/developer.md b/docs/developer.md index 9d47258b7..e359ff34a 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -50,50 +50,18 @@ def test_method_to_test(caplog): ``` -### Local docker usage +### Devcontainer setup -The fastest and easiest way to start up is to use docker-compose.develop which gives developers the ability to start the bot up with all the required dependencies, *without* needing to install any freqtrade specific dependencies on your local machine. +The fastest and easiest way to get started is to use [VSCode](https://code.visualstudio.com/) with the Remote container extension. +This gives developers the ability to start the bot with all required dependencies *without* needing to install any freqtrade specific dependencies on your local machine. #### Install -* [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) +* [VSCode](https://code.visualstudio.com/) * [docker](https://docs.docker.com/install/) -* [docker-compose](https://docs.docker.com/compose/install/) +* [Remote container extension documentation](https://code.visualstudio.com/docs/remote) -#### Starting the bot - -##### Use the develop dockerfile - -``` bash -rm docker-compose.yml && mv docker-compose.develop.yml docker-compose.yml -``` - -#### Docker Compose - -##### Starting - -``` bash -docker-compose up -``` - -![Docker compose up](https://user-images.githubusercontent.com/419355/65456322-47f63a80-de06-11e9-90c6-3c74d1bad0b8.png) - -##### Rebuilding - -``` bash -docker-compose build -``` - -##### Executing (effectively SSH into the container) - -The `exec` command requires that the container already be running, if you want to start it -that can be effected by `docker-compose up` or `docker-compose run freqtrade_develop` - -``` bash -docker-compose exec freqtrade_develop /bin/bash -``` - -![image](https://user-images.githubusercontent.com/419355/65456522-ba671a80-de06-11e9-9598-df9ca0d8dcac.png) +For more information about the [Remote container extension](https://code.visualstudio.com/docs/remote), best consult the documentation. ## ErrorHandling From cf85a178f33da910010a423cebe90f0aa076d0df Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 12:34:57 +0000 Subject: [PATCH 08/26] Update developer documentation related to devcontainer --- docs/developer.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/developer.md b/docs/developer.md index e359ff34a..22de01f78 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -21,11 +21,24 @@ This will spin up a local server (usually on port 8000) so you can see if everyt ## Developer setup -To configure a development environment, best use the `setup.sh` script and answer "y" when asked "Do you want to install dependencies for dev [y/N]? ". -Alternatively (if your system is not supported by the setup.sh script), follow the manual installation process and run `pip3 install -e .[all]`. +To configure a development environment, you can either use the provided [DevContainer](#devcontainer-setup), or use the `setup.sh` script and answer "y" when asked "Do you want to install dependencies for dev [y/N]? ". +Alternatively (e.g. if your system is not supported by the setup.sh script), follow the manual installation process and run `pip3 install -e .[all]`. This will install all required tools for development, including `pytest`, `flake8`, `mypy`, and `coveralls`. +### Devcontainer setup + +The fastest and easiest way to get started is to use [VSCode](https://code.visualstudio.com/) with the Remote container extension. +This gives developers the ability to start the bot with all required dependencies *without* needing to install any freqtrade specific dependencies on your local machine. + +#### Devcontainer dependencies + +* [VSCode](https://code.visualstudio.com/) +* [docker](https://docs.docker.com/install/) +* [Remote container extension documentation](https://code.visualstudio.com/docs/remote) + +For more information about the [Remote container extension](https://code.visualstudio.com/docs/remote), best consult the documentation. + ### Tests New code should be covered by basic unittests. Depending on the complexity of the feature, Reviewers may request more in-depth unittests. @@ -50,19 +63,6 @@ def test_method_to_test(caplog): ``` -### Devcontainer setup - -The fastest and easiest way to get started is to use [VSCode](https://code.visualstudio.com/) with the Remote container extension. -This gives developers the ability to start the bot with all required dependencies *without* needing to install any freqtrade specific dependencies on your local machine. - -#### Install - -* [VSCode](https://code.visualstudio.com/) -* [docker](https://docs.docker.com/install/) -* [Remote container extension documentation](https://code.visualstudio.com/docs/remote) - -For more information about the [Remote container extension](https://code.visualstudio.com/docs/remote), best consult the documentation. - ## ErrorHandling Freqtrade Exceptions all inherit from `FreqtradeException`. From 0a7b6f73c9fc895869ab4b2b4c0178e95bd8de3d Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 12:35:08 +0000 Subject: [PATCH 09/26] Move devcontainer stuff to .devcontainer --- .devcontainer/Dockerfile | 22 ++++++++++++++++++++++ .devcontainer/devcontainer.json | 5 ----- .devcontainer/docker-compose.yml | 7 +++++-- docker-compose.develop.yml | 20 -------------------- 4 files changed, 27 insertions(+), 27 deletions(-) create mode 100644 .devcontainer/Dockerfile delete mode 100644 docker-compose.develop.yml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..1c2ab8de0 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,22 @@ +FROM freqtradeorg/freqtrade:develop + +# Install dependencies +COPY requirements-dev.txt /freqtrade/ +RUN apt-get update \ + && apt-get -y install git sudo vim \ + && apt-get clean \ + && pip install numpy --no-cache-dir \ + # Install ALL dependencies + && pip install -r requirements-dev.txt --no-cache-dir \ + # Install documentation dependencies (to enable mkdocs) + && pip install -r docs/requirements-docs.txt --no-cache-dir \ + && useradd -m ftuser \ + && mkdir -p /home/ftuser/.vscode-server /home/ftuser/.vscode-server-insiders /home/ftuser/commandhistory \ + && echo "export PROMPT_COMMAND='history -a'" >> /home/ftuser/.bashrc \ + && echo "export HISTFILE=~/commandhistory/.bash_history" >> /home/ftuser/.bashrc \ + && chown ftuser: -R /home/ftuser/ + +USER ftuser + +# Empty the ENTRYPOINT to allow all commands +ENTRYPOINT [] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7a5e43cf1..1882e3bdf 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,17 +1,12 @@ { "name": "freqtrade Develop", - // Update the 'dockerComposeFile' list if you have more compose files or use different names. - // The .devcontainer/docker-compose.yml file contains any overrides you need/want to make. "dockerComposeFile": [ "docker-compose.yml" - // "docker-compose.vscode.yml" ], "service": "ft_vscode", - // The optional 'workspaceFolder' property is the path VS Code should open by default when - // connected. This is typically a file mount in .devcontainer/docker-compose.yml "workspaceFolder": "/freqtrade/", "settings": { diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 93ffee309..7cf3ba2f5 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -4,14 +4,17 @@ services: ft_vscode: build: context: .. - dockerfile: "Dockerfile.develop" + dockerfile: ".devcontainer/Dockerfile" volumes: - ..:/freqtrade:cached - freqtrade-vscode-server:/home/ftuser/.vscode-server - freqtrade-bashhistory:/home/ftuser/commandhistory - + # Expose API port + ports: + - "127.0.0.1:8080:8080" command: /bin/sh -c "while sleep 1000; do :; done" + volumes: freqtrade-vscode-server: freqtrade-bashhistory: diff --git a/docker-compose.develop.yml b/docker-compose.develop.yml deleted file mode 100644 index 562b5960a..000000000 --- a/docker-compose.develop.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -version: '3' -services: - freqtrade_develop: - build: - context: . - dockerfile: "./Dockerfile.develop" - volumes: - - ".:/freqtrade" - entrypoint: - - "freqtrade" - - freqtrade_bash: - build: - context: . - dockerfile: "./Dockerfile.develop" - volumes: - - ".:/freqtrade" - entrypoint: - - "/bin/bash" From 4355f36cd6eae5e96acf8bef52bcbb9a8c6cd795 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 12:36:47 +0000 Subject: [PATCH 10/26] Add gitconfig to devcontainer --- .devcontainer/docker-compose.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 7cf3ba2f5..7b5e64609 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -6,7 +6,11 @@ services: context: .. dockerfile: ".devcontainer/Dockerfile" volumes: + # Allow git usage within container + - "/home/${USER}/.ssh:/home/ftuser/.ssh:ro" + - "/home/${USER}/.gitconfig:/home/ftuser/.gitconfig:ro" - ..:/freqtrade:cached + # Persist bash-history - freqtrade-vscode-server:/home/ftuser/.vscode-server - freqtrade-bashhistory:/home/ftuser/commandhistory # Expose API port From 096079a595f03294ffea6a03f70b2f4c90fbea93 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 12:41:17 +0000 Subject: [PATCH 11/26] Install autopep8 --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 1c2ab8de0..3430cac5a 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -5,7 +5,7 @@ COPY requirements-dev.txt /freqtrade/ RUN apt-get update \ && apt-get -y install git sudo vim \ && apt-get clean \ - && pip install numpy --no-cache-dir \ + && pip install autopep8--no-cache-dir \ # Install ALL dependencies && pip install -r requirements-dev.txt --no-cache-dir \ # Install documentation dependencies (to enable mkdocs) From 129cbf5ef58ad991465dbd5b2ce1971f63ac035a Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 14:58:15 +0200 Subject: [PATCH 12/26] Add more Dockerfiles --- Dockerfile.develop => docker/Dockerfile.develop | 1 + docker/Dockerfile.jupyter | 7 +++++++ docker/Dockerfile.plot | 9 +++++++++ .../Dockerfile.technical | 0 docker/docker-compose-jupyter.yml | 16 ++++++++++++++++ 5 files changed, 33 insertions(+) rename Dockerfile.develop => docker/Dockerfile.develop (99%) create mode 100644 docker/Dockerfile.jupyter create mode 100644 docker/Dockerfile.plot rename Dockerfile.technical => docker/Dockerfile.technical (100%) create mode 100644 docker/docker-compose-jupyter.yml diff --git a/Dockerfile.develop b/docker/Dockerfile.develop similarity index 99% rename from Dockerfile.develop rename to docker/Dockerfile.develop index 8f6871c55..cb49984e2 100644 --- a/Dockerfile.develop +++ b/docker/Dockerfile.develop @@ -2,6 +2,7 @@ FROM freqtradeorg/freqtrade:develop # Install dependencies COPY requirements-dev.txt /freqtrade/ + RUN pip install numpy --no-cache-dir \ && pip install -r requirements-dev.txt --no-cache-dir diff --git a/docker/Dockerfile.jupyter b/docker/Dockerfile.jupyter new file mode 100644 index 000000000..b7499eeef --- /dev/null +++ b/docker/Dockerfile.jupyter @@ -0,0 +1,7 @@ +FROM freqtradeorg/freqtrade:develop_plot + + +RUN pip install jupyterlab --no-cache-dir + +# Empty the ENTRYPOINT to allow all commands +ENTRYPOINT [] diff --git a/docker/Dockerfile.plot b/docker/Dockerfile.plot new file mode 100644 index 000000000..9313a34b9 --- /dev/null +++ b/docker/Dockerfile.plot @@ -0,0 +1,9 @@ +FROM freqtradeorg/freqtrade:develop + +# Install dependencies +COPY requirements-plot.txt /freqtrade/ + +RUN pip install -r requirements-plot.txt --no-cache-dir + +# Empty the ENTRYPOINT to allow all commands +ENTRYPOINT [] diff --git a/Dockerfile.technical b/docker/Dockerfile.technical similarity index 100% rename from Dockerfile.technical rename to docker/Dockerfile.technical diff --git a/docker/docker-compose-jupyter.yml b/docker/docker-compose-jupyter.yml new file mode 100644 index 000000000..4b396d0f5 --- /dev/null +++ b/docker/docker-compose-jupyter.yml @@ -0,0 +1,16 @@ +--- +version: '3' +services: + freqtrade: + build: + context: .. + dockerfile: docker/Dockerfile.jupyter + restart: unless-stopped + container_name: freqtrade + ports: + - "18889:8888" + volumes: + - "./user_data:/freqtrade/user_data" + # Default command used when running `docker compose up` + command: > + jupyter lab --port=8888 --ip 0.0.0.0 --allow-root From 85ab6e43baee20e9b6666f7077fa7f6760af3c9d Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 14:58:27 +0200 Subject: [PATCH 13/26] Build _plot dockerfile --- build_helpers/publish_docker.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build_helpers/publish_docker.sh b/build_helpers/publish_docker.sh index 03a95161b..8e132ecba 100755 --- a/build_helpers/publish_docker.sh +++ b/build_helpers/publish_docker.sh @@ -2,6 +2,7 @@ # Replace / with _ to create a valid tag TAG=$(echo "${BRANCH_NAME}" | sed -e "s/\//_/g") +TAG_PLOT=${TAG}_plot echo "Running for ${TAG}" # Add commit and commit_message to docker container @@ -16,6 +17,7 @@ else docker pull ${IMAGE_NAME}:${TAG} docker build --cache-from ${IMAGE_NAME}:${TAG} -t freqtrade:${TAG} . fi +docker build --cache-from freqtrade:${TAG} -t freqtrade:${TAG_PLOT} -f docker/Dockerfile.plot . if [ $? -ne 0 ]; then echo "failed building image" @@ -32,6 +34,7 @@ fi # Tag image for upload docker tag freqtrade:$TAG ${IMAGE_NAME}:$TAG +docker tag freqtrade:$TAG_PLOT ${IMAGE_NAME}:$TAG_PLOT if [ $? -ne 0 ]; then echo "failed tagging image" return 1 From 40132bbea400497143f464688d9733f6e4a0bdf0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 14:58:37 +0200 Subject: [PATCH 14/26] Add this branch to CI --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8bc01fa6..34683ce9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: branches: - master - develop + - add_devcontainer tags: release: types: [published] From f9efbed0765ed0597544f7c2f798219088086478 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 14:59:13 +0200 Subject: [PATCH 15/26] Ignore userdata from docker build --- .dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.dockerignore b/.dockerignore index 223b3b110..09f4c9f0c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -13,3 +13,4 @@ CONTRIBUTING.md MANIFEST.in README.md freqtrade.service +user_data From 30c1253f75949871011843c96e5ea9c12a507aeb Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 15:02:07 +0200 Subject: [PATCH 16/26] Use correct ports for jupyter compose file --- docker/docker-compose-jupyter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker-compose-jupyter.yml b/docker/docker-compose-jupyter.yml index 4b396d0f5..14e45983d 100644 --- a/docker/docker-compose-jupyter.yml +++ b/docker/docker-compose-jupyter.yml @@ -8,7 +8,7 @@ services: restart: unless-stopped container_name: freqtrade ports: - - "18889:8888" + - "127.0.0.1:8888:8888" volumes: - "./user_data:/freqtrade/user_data" # Default command used when running `docker compose up` From ab190f7a5b5acc9ca02935b08edad81c442a96e9 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 15:12:30 +0200 Subject: [PATCH 17/26] Document jupyter with docker usage --- docs/data-analysis.md | 22 +++++++++++++++------- docs/docker_quickstart.md | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/docs/data-analysis.md b/docs/data-analysis.md index fc4693b17..17da98935 100644 --- a/docs/data-analysis.md +++ b/docs/data-analysis.md @@ -1,12 +1,22 @@ # Analyzing bot data with Jupyter notebooks -You can analyze the results of backtests and trading history easily using Jupyter notebooks. Sample notebooks are located at `user_data/notebooks/`. +You can analyze the results of backtests and trading history easily using Jupyter notebooks. Sample notebooks are located at `user_data/notebooks/` after initializing the user directory with `freqtrade create-userdir --userdir user_data`. -## Pro tips +## Quick start with docker + +Freqtrade provides a docker-compose file which starts up a jupyter lab server. +You can run this server using the following command: `docker-compose -f docker/docker-compose-jupyter.yml up` + +This will create a dockercontainer running jupyter lab, which will be accessible using `https://127.0.0.1:8888/lab`. +Please use the link that's printed in the console after startup for simplified login. + +For more information, Please visit the [Data analysis with Docker](docker_quickstart.md#data-analayis-using-docker-compose) section. + +### Pro tips * See [jupyter.org](https://jupyter.org/documentation) for usage instructions. * Don't forget to start a Jupyter notebook server from within your conda or venv environment or use [nb_conda_kernels](https://github.com/Anaconda-Platform/nb_conda_kernels)* -* Copy the example notebook before use so your changes don't get clobbered with the next freqtrade update. +* Copy the example notebook before use so your changes don't get overwritten with the next freqtrade update. ### Using virtual environment with system-wide Jupyter installation @@ -28,10 +38,8 @@ ipython kernel install --user --name=freqtrade !!! Note This section is provided for completeness, the Freqtrade Team won't provide full support for problems with this setup and will recommend to install Jupyter in the virtual environment directly, as that is the easiest way to get jupyter notebooks up and running. For help with this setup please refer to the [Project Jupyter](https://jupyter.org/) [documentation](https://jupyter.org/documentation) or [help channels](https://jupyter.org/community). - -## Fine print - -Some tasks don't work especially well in notebooks. For example, anything using asynchronous execution is a problem for Jupyter. Also, freqtrade's primary entry point is the shell cli, so using pure python in a notebook bypasses arguments that provide required objects and parameters to helper functions. You may need to set those values or create expected objects manually. +!!! Warning + Some tasks don't work especially well in notebooks. For example, anything using asynchronous execution is a problem for Jupyter. Also, freqtrade's primary entry point is the shell cli, so using pure python in a notebook bypasses arguments that provide required objects and parameters to helper functions. You may need to set those values or create expected objects manually. ## Recommended workflow diff --git a/docs/docker_quickstart.md b/docs/docker_quickstart.md index c033e827b..853d57f3d 100644 --- a/docs/docker_quickstart.md +++ b/docs/docker_quickstart.md @@ -160,3 +160,21 @@ You'll then also need to modify the `docker-compose.yml` file and uncomment the ``` You can then run `docker-compose build` to build the docker image, and run it using the commands described above. + +## Data analayis using docker compose + +Freqtrade provides a docker-compose file which starts up a jupyter lab server. +You can run this server using the following command: + +``` bash +docker-compose -f docker/docker-compose-jupyter.yml up +``` + +This will create a dockercontainer running jupyter lab, which will be accessible using `https://127.0.0.1:8888/lab`. +Please use the link that's printed in the console after startup for simplified login. + +Since part of this image is built on your machine, it is recommended to rebuild the image from time to time to keep freqtrade (and dependencies) uptodate. + +``` bash +docker-compose -f docker/docker-compose-jupyter.yml build --no-cache +``` From b02c0904b6bcbbc1616798fb0edfb2fd67cc9d9c Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 15:17:54 +0200 Subject: [PATCH 18/26] Use buildarg to use correct parent variable --- build_helpers/publish_docker.sh | 2 +- docker/Dockerfile.plot | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build_helpers/publish_docker.sh b/build_helpers/publish_docker.sh index 8e132ecba..53e18063c 100755 --- a/build_helpers/publish_docker.sh +++ b/build_helpers/publish_docker.sh @@ -17,7 +17,7 @@ else docker pull ${IMAGE_NAME}:${TAG} docker build --cache-from ${IMAGE_NAME}:${TAG} -t freqtrade:${TAG} . fi -docker build --cache-from freqtrade:${TAG} -t freqtrade:${TAG_PLOT} -f docker/Dockerfile.plot . +docker build --cache-from freqtrade:${TAG} --build-arg sourceimage=${TAG} -t freqtrade:${TAG_PLOT} -f docker/Dockerfile.plot . if [ $? -ne 0 ]; then echo "failed building image" diff --git a/docker/Dockerfile.plot b/docker/Dockerfile.plot index 9313a34b9..1843efdcb 100644 --- a/docker/Dockerfile.plot +++ b/docker/Dockerfile.plot @@ -1,4 +1,5 @@ -FROM freqtradeorg/freqtrade:develop +ARG sourceimage=develop +FROM freqtradeorg/freqtrade:${sourceimage} # Install dependencies COPY requirements-plot.txt /freqtrade/ From 8ff1429e68b611db4d90ed4d4e5a6f3ecd5e6267 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 15:38:53 +0200 Subject: [PATCH 19/26] Add user_data to backtesting --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 22b0c43a7..cdf96abcd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,8 @@ RUN pip install numpy --no-cache-dir \ # Install and execute COPY . /freqtrade/ -RUN pip install -e . --no-cache-dir +RUN pip install -e . --no-cache-dir \ + && mkdir /freqtrade/user_data/ ENTRYPOINT ["freqtrade"] # Default to trade mode CMD [ "trade" ] From 3c460d37b66744a43ab6eaaa6fed19bcb0556231 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 16:20:01 +0200 Subject: [PATCH 20/26] Document existence of PLOT image --- docker-compose.yml | 2 ++ docs/developer.md | 1 + docs/docker_quickstart.md | 11 +++++++++++ 3 files changed, 14 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 49d83aa5e..ca8554b43 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,8 @@ services: freqtrade: image: freqtradeorg/freqtrade:master # image: freqtradeorg/freqtrade:develop + # Use plotting image + # image: freqtradeorg/freqtrade:develop_plot # Build step - only needed when additional dependencies are needed # build: # context: . diff --git a/docs/developer.md b/docs/developer.md index 22de01f78..7c0d61094 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -232,6 +232,7 @@ This documents some decisions taken for the CI Pipeline. * CI runs on all OS variants, Linux (ubuntu), macOS and Windows. * Docker images are build for the branches `master` and `develop`. +* Docker images containing Plot dependencies are also available as `master_plot` and `develop_plot`. * Raspberry PI Docker images are postfixed with `_pi` - so tags will be `:master_pi` and `develop_pi`. * Docker images contain a file, `/freqtrade/freqtrade_commit` containing the commit this image is based of. * Full docker image rebuilds are run once a week via schedule. diff --git a/docs/docker_quickstart.md b/docs/docker_quickstart.md index 853d57f3d..857c3d0cc 100644 --- a/docs/docker_quickstart.md +++ b/docs/docker_quickstart.md @@ -161,6 +161,17 @@ You'll then also need to modify the `docker-compose.yml` file and uncomment the You can then run `docker-compose build` to build the docker image, and run it using the commands described above. +## Plotting with docker-compose + +Commands `freqtrade plot-profit` and `freqtrade plot-dataframe` ([Documentation](plotting.md)) are available by changing the image to `*_plot` in your docker-compose.yml file. +You can then use these commands as follows: + +``` bash +docker-compose run --rm freqtrade plot-dataframe --strategy AwesomeStrategy -p BTC/ETH --timerange=20180801-20180805 +``` + +The output will be stored in the `user_data/plot` directory, and can be opened with any modern browser. + ## Data analayis using docker compose Freqtrade provides a docker-compose file which starts up a jupyter lab server. From 261b267160a240f196bdafc44fd848a4ae2e6879 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 16:20:17 +0200 Subject: [PATCH 21/26] Don't build devcontainer on push --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34683ce9b..e8bc01fa6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,6 @@ on: branches: - master - develop - - add_devcontainer tags: release: types: [published] From 7dadca421aca7dea08415061dba2adb3fd4c9a97 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 16:26:48 +0200 Subject: [PATCH 22/26] Update location of docker files --- docs/docker.md | 8 ++++---- docs/docker_quickstart.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/docker.md b/docs/docker.md index 3fe335cf0..59d03164b 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -70,16 +70,16 @@ cp -n config.json.example config.json Best start by pulling the official docker image from dockerhub as explained [here](#download-the-official-docker-image) to speed up building. -To add additional libraries to your docker image, best check out [Dockerfile.technical](https://github.com/freqtrade/freqtrade/blob/develop/Dockerfile.technical) which adds the [technical](https://github.com/freqtrade/technical) module to the image. +To add additional libraries to your docker image, best check out [Dockerfile.technical](https://github.com/freqtrade/freqtrade/blob/develop/docker/Dockerfile.technical) which adds the [technical](https://github.com/freqtrade/technical) module to the image. ```bash -docker build -t freqtrade -f Dockerfile.technical . +docker build -t freqtrade -f docker/Dockerfile.technical . ``` -If you are developing using Docker, use `Dockerfile.develop` to build a dev Docker image, which will also set up develop dependencies: +If you are developing using Docker, use `docker/Dockerfile.develop` to build a dev Docker image, which will also set up develop dependencies: ```bash -docker build -f Dockerfile.develop -t freqtrade-dev . +docker build -f docker/Dockerfile.develop -t freqtrade-dev . ``` !!! Warning "Include your config file manually" diff --git a/docs/docker_quickstart.md b/docs/docker_quickstart.md index 857c3d0cc..ad82aea3f 100644 --- a/docs/docker_quickstart.md +++ b/docs/docker_quickstart.md @@ -148,7 +148,7 @@ Head over to the [Backtesting Documentation](backtesting.md) to learn more. ### Additional dependencies with docker-compose If your strategy requires dependencies not included in the default image (like [technical](https://github.com/freqtrade/technical)) - it will be necessary to build the image on your host. -For this, please create a Dockerfile containing installation steps for the additional dependencies (have a look at [Dockerfile.technical](https://github.com/freqtrade/freqtrade/blob/develop/Dockerfile.technical) for an example). +For this, please create a Dockerfile containing installation steps for the additional dependencies (have a look at [docker/Dockerfile.technical](https://github.com/freqtrade/freqtrade/blob/develop/docker/Dockerfile.technical) for an example). You'll then also need to modify the `docker-compose.yml` file and uncomment the build step, as well as rename the image to avoid naming collisions. From 50aec1d6d3d224023ffe278f1eca1601b0e6e8ba Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Sep 2020 20:19:07 +0200 Subject: [PATCH 23/26] Jupyter service should be called differently --- .devcontainer/Dockerfile | 8 ++------ docker/docker-compose-jupyter.yml | 2 +- docs/docker_quickstart.md | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 3430cac5a..b333dc19d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -5,12 +5,8 @@ COPY requirements-dev.txt /freqtrade/ RUN apt-get update \ && apt-get -y install git sudo vim \ && apt-get clean \ - && pip install autopep8--no-cache-dir \ - # Install ALL dependencies - && pip install -r requirements-dev.txt --no-cache-dir \ - # Install documentation dependencies (to enable mkdocs) - && pip install -r docs/requirements-docs.txt --no-cache-dir \ - && useradd -m ftuser \ + && pip install autopep8 -r docs/requirements-docs.txt -r requirements-dev.txt --no-cache-dir \ + && useradd -u 1000 -U -m ftuser \ && mkdir -p /home/ftuser/.vscode-server /home/ftuser/.vscode-server-insiders /home/ftuser/commandhistory \ && echo "export PROMPT_COMMAND='history -a'" >> /home/ftuser/.bashrc \ && echo "export HISTFILE=~/commandhistory/.bash_history" >> /home/ftuser/.bashrc \ diff --git a/docker/docker-compose-jupyter.yml b/docker/docker-compose-jupyter.yml index 14e45983d..11a01705c 100644 --- a/docker/docker-compose-jupyter.yml +++ b/docker/docker-compose-jupyter.yml @@ -1,7 +1,7 @@ --- version: '3' services: - freqtrade: + ft_jupyterlab: build: context: .. dockerfile: docker/Dockerfile.jupyter diff --git a/docs/docker_quickstart.md b/docs/docker_quickstart.md index ad82aea3f..dd89ff2e7 100644 --- a/docs/docker_quickstart.md +++ b/docs/docker_quickstart.md @@ -178,7 +178,7 @@ Freqtrade provides a docker-compose file which starts up a jupyter lab server. You can run this server using the following command: ``` bash -docker-compose -f docker/docker-compose-jupyter.yml up +docker-compose --rm -f docker/docker-compose-jupyter.yml up ``` This will create a dockercontainer running jupyter lab, which will be accessible using `https://127.0.0.1:8888/lab`. From 4cb5c9c85fa941e09e256148d38b815becac5395 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Sep 2020 05:39:56 +0000 Subject: [PATCH 24/26] Bump mkdocs-material from 5.5.12 to 5.5.13 Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 5.5.12 to 5.5.13. - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md) - [Commits](https://github.com/squidfunk/mkdocs-material/compare/5.5.12...5.5.13) Signed-off-by: dependabot[bot] --- docs/requirements-docs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index 6408616a0..d4c93928e 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,2 +1,2 @@ -mkdocs-material==5.5.12 +mkdocs-material==5.5.13 mdx_truly_sane_lists==1.2 From d1b3a16c1369d8af8f4ed6ed5b1442b8b002a363 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Sep 2020 05:39:56 +0000 Subject: [PATCH 25/26] Bump ccxt from 1.34.25 to 1.34.40 Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.34.25 to 1.34.40. - [Release notes](https://github.com/ccxt/ccxt/releases) - [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst) - [Commits](https://github.com/ccxt/ccxt/compare/1.34.25...1.34.40) Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5da544a3c..44d2f29a2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ numpy==1.19.2 pandas==1.1.2 -ccxt==1.34.25 +ccxt==1.34.40 SQLAlchemy==1.3.19 python-telegram-bot==12.8 arrow==0.16.0 From be33556838161a1ee3b7657a54737318863b2f0b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Sep 2020 05:40:00 +0000 Subject: [PATCH 26/26] Bump nbconvert from 6.0.2 to 6.0.4 Bumps [nbconvert](https://github.com/jupyter/nbconvert) from 6.0.2 to 6.0.4. - [Release notes](https://github.com/jupyter/nbconvert/releases) - [Commits](https://github.com/jupyter/nbconvert/compare/6.0.2...6.0.4) Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index c14a146fa..ffe2763a6 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -15,4 +15,4 @@ pytest-mock==3.3.1 pytest-random-order==1.0.4 # Convert jupyter notebooks to markdown documents -nbconvert==6.0.2 +nbconvert==6.0.4