Seperate requirements to run the bot and to develop.
- Add a requirements-dev.txt file which includes additional deps for development. - Add a Dockerfile.develop which installs all deps for development and also enables dev commands. - Change related documentations on how to run/dev the bot.
This commit is contained in:
parent
5d253f352c
commit
1372095c66
@ -20,7 +20,7 @@ install:
|
|||||||
- ./build_helpers/install_ta-lib.sh
|
- ./build_helpers/install_ta-lib.sh
|
||||||
- export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
|
- export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
|
||||||
- pip install --upgrade flake8 coveralls pytest-random-order pytest-asyncio mypy
|
- pip install --upgrade flake8 coveralls pytest-random-order pytest-asyncio mypy
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements-dev.txt
|
||||||
- pip install -e .
|
- pip install -e .
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
|
9
Dockerfile.develop
Normal file
9
Dockerfile.develop
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
FROM freqtrade:latest
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
COPY requirements-dev.txt /freqtrade/
|
||||||
|
RUN pip install numpy --no-cache-dir \
|
||||||
|
&& pip install -r requirements-dev.txt --no-cache-dir
|
||||||
|
|
||||||
|
# Empty the ENTRYPOINT to allow all commands
|
||||||
|
ENTRYPOINT []
|
@ -134,6 +134,13 @@ cd freqtrade
|
|||||||
docker build -t freqtrade .
|
docker build -t freqtrade .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you are developing using Docker, use `Dockerfile.develop` instead, which will also set up develop dependencies:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd freqtrade
|
||||||
|
docker build -f ./Dockerfile.develop -t freqtrade .
|
||||||
|
```
|
||||||
|
|
||||||
For security reasons, your configuration file will not be included in the image, you will need to bind mount it. It is also advised to bind mount an SQLite database file (see the "5. Run a restartable docker image" section) to keep it between updates.
|
For security reasons, your configuration file will not be included in the image, you will need to bind mount it. It is also advised to bind mount an SQLite database file (see the "5. Run a restartable docker image" section) to keep it between updates.
|
||||||
|
|
||||||
### 3. Verify the Docker image
|
### 3. Verify the Docker image
|
||||||
|
8
requirements-dev.txt
Normal file
8
requirements-dev.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Include all requirements to run the bot.
|
||||||
|
-r requirements.txt
|
||||||
|
|
||||||
|
flake8==3.6.0
|
||||||
|
pytest==4.0.2
|
||||||
|
pytest-mock==1.10.0
|
||||||
|
pytest-asyncio==0.9.0
|
||||||
|
pytest-cov==2.6.0
|
@ -13,19 +13,12 @@ scipy==1.1.0
|
|||||||
jsonschema==2.6.0
|
jsonschema==2.6.0
|
||||||
numpy==1.15.4
|
numpy==1.15.4
|
||||||
TA-Lib==0.4.17
|
TA-Lib==0.4.17
|
||||||
pytest==4.0.2
|
|
||||||
pytest-mock==1.10.0
|
|
||||||
pytest-asyncio==0.9.0
|
|
||||||
pytest-cov==2.6.0
|
|
||||||
tabulate==0.8.2
|
tabulate==0.8.2
|
||||||
coinmarketcap==5.0.3
|
coinmarketcap==5.0.3
|
||||||
|
|
||||||
# Required for hyperopt
|
# Required for hyperopt
|
||||||
scikit-optimize==0.5.2
|
scikit-optimize==0.5.2
|
||||||
|
|
||||||
# Required for plotting data
|
|
||||||
#plotly==3.1.1
|
|
||||||
|
|
||||||
# find first, C search in arrays
|
# find first, C search in arrays
|
||||||
py_find_1st==1.1.3
|
py_find_1st==1.1.3
|
||||||
|
|
||||||
|
10
setup.sh
10
setup.sh
@ -28,6 +28,16 @@ function updateenv () {
|
|||||||
pip3 install --quiet --upgrade pip
|
pip3 install --quiet --upgrade pip
|
||||||
pip3 install --quiet -r requirements.txt --upgrade
|
pip3 install --quiet -r requirements.txt --upgrade
|
||||||
pip3 install --quiet -r requirements.txt
|
pip3 install --quiet -r requirements.txt
|
||||||
|
|
||||||
|
read -p "Do you want to install dependencies for dev [Y/N]? "
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
|
then
|
||||||
|
pip3 install --quiet -r requirements-dev.txt --upgrade
|
||||||
|
pip3 install --quiet -r requirements-dev.txt
|
||||||
|
else
|
||||||
|
echo "Dev dependencies ignored."
|
||||||
|
fi
|
||||||
|
|
||||||
pip3 install --quiet -e .
|
pip3 install --quiet -e .
|
||||||
echo "pip3 install completed"
|
echo "pip3 install completed"
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user