version: '3.8'

#==================================================
# Relies on the file `.env` content for varables:
#    ROOT_DIR
#    JUPYTER_PORT
#==================================================

services:
  jupyter:
    user: "oleg"
    build: ${ROOT_DIR}
    image: cvtt/jupyter_gpu_tf:v1.0.2
    container_name: jupyter_gpu_tf
    runtime: nvidia
    environment:
      - JUPYTER_ENABLE_LAB=yes
      - 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
    ports:
      - "${JUPYTER_PORT}:${JUPYTER_PORT}"
    shm_size: "8gb"
