jupyter notebook - contains libraries for machine learning and stock technical analysis
217
Runs jupyter notebook that has preinstalled libraries for stock technical analysis.
sudo docker build -t custom_miniconda .
sudo docker rm custom_miniconda
sudo docker run --name custom_miniconda -i -t -p 8888:8888 -v "${PWD}:/notebooks" coil/custom_miniconda
to get the token run this in different terminal:
sudo docker exec -it custom_miniconda conda run -n trading_env jupyter notebook list
Dockerfile:
# custom miniconda build that contains only libraries that we really need
# we can specify for example numpy, pandas, matplotlib ...
# maintainer: tcoil.info
#
# build as
# sudo docker build -t custom_miniconda .
#
# run this image as
# coil@coil:~/Desktop/miniconda_docker_build$ sudo docker run --name custom_miniconda -i -t -p 8888:8888 -v "${PWD}:/notebooks" custom_miniconda
# or with docker compose demonized
FROM centos:8
RUN yum update -y
RUN yum install -y wget
RUN wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
# install in batch (silent) mode, does not edit PATH or .bashrc or .bash_profile
# -p path
# -f force
RUN bash Miniconda3-latest-Linux-x86_64.sh -b
ENV PATH=/root/miniconda3/bin:${PATH}
#RUN source /root/.bashrc
#RUN source /root/.bash_profile
# cleanup
RUN rm Miniconda3-latest-Linux-x86_64.sh
# create directory for notebooks
RUN mkdir /notebooks
WORKDIR /notebooks
COPY . /notebooks/
##############################################################
RUN conda create -n trading_env python=3.6 pip
SHELL ["conda", "run", "-n", "trading_env", "/bin/bash", "-c"]
# should work as well
# conda init bash
# source ~/.bashrc
# conda activate trading_env
RUN python --version
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
######RUN pip install --upgrade mplfinance
RUN conda update -y --all
RUN conda list
RUN conda install -c quantopian ta-lib
###############RUN conda install -c conda-forge jupyterlab
# experimental
####RUN conda install -y -c plotly plotly
####RUN conda install -y -c plotly chart-studio
####RUN conda install jupyterlab "ipywidgets=7.5"
RUN conda install -c conda-forge mplfinance
RUN conda install -c anaconda pandas-datareader
RUN conda install joblib
RUN conda install pytorch torchvision torchaudio cpuonly -c pytorch
RUN conda install -c conda-forge scikit-learn
RUN conda install -c conda-forge keras==2.2.2
RUN conda install -c conda-forge tensorflow
# have everything updated
RUN conda update -y --all
EXPOSE 8888
# start the jupyter notebook in server mode
CMD ["conda", "run", "-n", "trading_env", "jupyter","notebook","--ip=0.0.0.0","--port=8888","--no-browser","--allow-root", "--notebook-dir=/notebooks"]
# alternatively start the jupyter-lab notebook in server mode
#CMD ["conda", "run", "-n", "trading_env", "jupyter-lab","--ip=0.0.0.0","--port=8888","--no-browser","--allow-root", "--notebook-dir=/notebooks"]
Content type
Image
Digest
Size
1.3 GB
Last updated
almost 6 years ago
docker pull coil/custom_miniconda