This commit is contained in:
2024-08-02 20:09:53 -04:00
parent afc4a45b0f
commit ac5b48db74
7 changed files with 152 additions and 3 deletions
+3
View File
@@ -0,0 +1,3 @@
ROOT_DIR=/opt/jupyter_gpu/tensorflow
DATA_DIR=/opt/jupyter_gpu/data
JUPYTER_PORT=9999
@@ -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=''"]
@@ -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"