diff --git a/build.sh b/build.sh index 5a3917e..85f0608 100755 --- a/build.sh +++ b/build.sh @@ -31,9 +31,9 @@ Cmd="docker build -t ${ImageName} -t ${ImageName}:${Version} -f ${DockerDir}/Doc echo ${Cmd} eval ${Cmd} -Cmd="docker save -o ${ImageDir}/${ImageName}.img.tar ${ImageName}" -echo ${Cmd} -eval ${Cmd} +# Cmd="docker save -o ${ImageDir}/${ImageName}.img.tar ${ImageName}" +# echo ${Cmd} +# eval ${Cmd} Cmd="docker tag ${ImageName}:latest ${RegistryService}/${ImageName}:latest" echo ${Cmd} diff --git a/research/jupyter_gpu_pytorch/.env b/research/jupyter_gpu_pytorch/.env new file mode 100644 index 0000000..ce603d5 --- /dev/null +++ b/research/jupyter_gpu_pytorch/.env @@ -0,0 +1,5 @@ +ROOT_DIR=/opt/jupyter_gpu/pytorch +DATA_DIR=/opt/jupyter_gpu/data +JUPYTER_PORT=8888 +PUID=1000 +PGID=1000 diff --git a/research/jupyter_gpu_pytorch/Dockerfile b/research/jupyter_gpu_pytorch/Dockerfile new file mode 100644 index 0000000..5f0eadd --- /dev/null +++ b/research/jupyter_gpu_pytorch/Dockerfile @@ -0,0 +1,41 @@ +# ------------------------------------------------------- +# Relies on JUPYTER_PORT being set in docker-compose.yml +# ------------------------------------------------------- +FROM pytorch/pytorch:latest + + +# Install packages +RUN pip install jupyterlab ipywidgets +RUN pip install pandas numpy +RUN pip install plotly +RUN pip install seaborn +RUN pip install statsmodels +# +RUN pip install autogluon +# +RUN pip install scikit-learn +RUN pip install Arch +RUN pip install Quantlib +RUN pip install Backtrader +RUN pip install pyfolio +RUN pip install XGBoost + +# Install additional applications +RUN apt update +RUN apt-get install graphviz -y + +RUN mkdir -p /workspace + +# Set environment variables, etc. +#ENV MY_ENV_VAR=myvalue +COPY cvttpy /cvttpy + +# Set the working directory +WORKDIR /workspace + +# Expose the port for JupyterLab +EXPOSE ${JUPYTER_PORT} + +# Command to run JupyterLab +CMD ["jupyter-lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root", "--NotebookApp.token=''"] + diff --git a/research/jupyter_gpu_pytorch/docker-compose.yml b/research/jupyter_gpu_pytorch/docker-compose.yml new file mode 100644 index 0000000..9a7ff0e --- /dev/null +++ b/research/jupyter_gpu_pytorch/docker-compose.yml @@ -0,0 +1,31 @@ +version: '3.8' + +#================================================== +# Relies on the file `.env` content for varables: +# ROOT_DIR +# DATA_DIR +# JUPYTER_PORT +# UID +# GID +#================================================== +services: + jupyter: + # user: "${UID}:${GID}" + # build: ${ROOT_DIR} + image: cloud21.cvtt.vpn:5500/jupyter_gpu_pt:latest + container_name: jupyter_gpu_pt + runtime: nvidia + restart: unless-stopped + environment: + - JUPYTER_ENABLE_LAB=yes + - PYTHONPATH=/cvtt/prod + volumes: + - ${ROOT_DIR}/notebooks:/workspace + - ${ROOT_DIR}/jupyter_settings/user-settings:/root/.jupyter/lab/user-settings + - ${ROOT_DIR}/jupyter_settings/workspaces:/root/.jupyter/lab/workspaces + - ${ROOT_DIR}/.cache/torch:/root/.cache/torch + + - ${DATA_DIR}:/workspace/data + ports: + - "${JUPYTER_PORT}:${JUPYTER_PORT}" + shm_size: "8gb" diff --git a/research/jupyter_gpu_tensorflow/.env b/research/jupyter_gpu_tensorflow/.env new file mode 100644 index 0000000..c4a70cf --- /dev/null +++ b/research/jupyter_gpu_tensorflow/.env @@ -0,0 +1,3 @@ +ROOT_DIR=/opt/jupyter_gpu/tensorflow +DATA_DIR=/opt/jupyter_gpu/data +JUPYTER_PORT=9999 diff --git a/research/jupyter_gpu_tensorflow/Dockerfile b/research/jupyter_gpu_tensorflow/Dockerfile new file mode 100644 index 0000000..f035faf --- /dev/null +++ b/research/jupyter_gpu_tensorflow/Dockerfile @@ -0,0 +1,42 @@ +# Use the official TensorFlow image with GPU support +FROM tensorflow/tensorflow:latest-gpu-jupyter + +# Install necessary packages +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + curl \ + ca-certificates \ + graphviz \ + && rm -rf /var/lib/apt/lists/* + +# RUN useradd -m -s /bin/bash oleg + +RUN mkdir -p /workspace/tf_cache + +# Install packages +RUN pip install jupyterlab +RUN pip install pandas +RUN pip install numpy +RUN pip install plotly +RUN pip install seaborn +RUN pip install statsmodels + +RUN pip install scikit-learn +RUN pip install Arch +RUN pip install Quantlib +RUN pip install Backtrader +RUN pip install pyfolio +RUN pip install XGBoost + +# Install additional applications +# RUN apt update +# RUN apt-get install graphviz -y + +# Set the working directory +WORKDIR /workspace + +# Expose the port for JupyterLab +EXPOSE ${JUPYTER_PORT} + +# Command to run JupyterLab +CMD ["sh", "-c", "jupyter lab --ip=0.0.0.0 --port=9999 --allow-root --no-browser --NotebookApp.token=''"] \ No newline at end of file diff --git a/research/jupyter_gpu_tensorflow/docker-compose.yml b/research/jupyter_gpu_tensorflow/docker-compose.yml new file mode 100644 index 0000000..0cee651 --- /dev/null +++ b/research/jupyter_gpu_tensorflow/docker-compose.yml @@ -0,0 +1,27 @@ +version: '3.8' + +#================================================== +# Relies on the file `.env` content for varables: +# ROOT_DIR +# DATA_DIR +# JUPYTER_PORT +#================================================== + +services: + jupyter: + image: cloud21.cvtt.vpn:5500/jupyter_gpu_tensorflow:latest + container_name: jupyter_gpu_tf + runtime: nvidia + restart: unless-stopped + environment: + - JUPYTER_ENABLE_LAB=yes + #- PYTHONPATH=/cvtt/prod + - TF_CACHE_DIR=/workspace/tf_cache + volumes: + - ${ROOT_DIR}/notebooks:/workspace + - ${ROOT_DIR}/jupyter_settings/user-settings:/home/oleg/.jupyter/lab/user-settings + - ${ROOT_DIR}/jupyter_settings/workspaces:/home/oleg/.jupyter/lab/workspaces + # - ${DATA_DIR}:/workspace/data + ports: + - "${JUPYTER_PORT}:${JUPYTER_PORT}" + shm_size: "8gb"