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
+5
View File
@@ -0,0 +1,5 @@
ROOT_DIR=/opt/jupyter_gpu/pytorch
DATA_DIR=/opt/jupyter_gpu/data
JUPYTER_PORT=8888
PUID=1000
PGID=1000
+41
View File
@@ -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=''"]
@@ -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"