This commit is contained in:
Oleg Sheynin 2024-06-12 19:10:26 +00:00
parent bd9c00cc67
commit a3445075cc
7 changed files with 308 additions and 287 deletions

View File

@ -1,2 +1,5 @@
ROOT_DIR=/opt/jupyter_gpu/pytorch ROOT_DIR=/opt/jupyter_gpu/pytorch
DATA_DIR=/opt/jupyter_gpu/data
JUPYTER_PORT=8888 JUPYTER_PORT=8888
PUID=1000
PGID=1000

View File

@ -3,24 +3,32 @@ version: '3.8'
#================================================== #==================================================
# Relies on the file `.env` content for varables: # Relies on the file `.env` content for varables:
# ROOT_DIR # ROOT_DIR
# DATA_DIR
# JUPYTER_PORT # JUPYTER_PORT
# UID
# GID
#================================================== #==================================================
services: services:
jupyter: jupyter:
user: "${UID}:${GID}"
build: ${ROOT_DIR} build: ${ROOT_DIR}
image: cvtt/jupyter_gpu_pt:v1.1.3 image: cvtt/jupyter_gpu_pt:v1.1.5
container_name: jupyter_gpu_pt container_name: jupyter_gpu_pt
runtime: nvidia runtime: nvidia
restart: unless-stopped
environment: environment:
- JUPYTER_ENABLE_LAB=yes - JUPYTER_ENABLE_LAB=yes
- PYTHONPATH=/cvtt/prod - PYTHONPATH=/cvtt/prod
# security_opt:
# - no-new-privileges:true
volumes: volumes:
- ${ROOT_DIR}/notebooks:/workspace - ${ROOT_DIR}/notebooks:/workspace
- ${ROOT_DIR}/jupyter_settings/user-settings:/root/.jupyter/lab/user-settings - ${ROOT_DIR}/jupyter_settings/user-settings:/root/.jupyter/lab/user-settings
- ${ROOT_DIR}/jupyter_settings/workspaces:/root/.jupyter/lab/workspaces - ${ROOT_DIR}/jupyter_settings/workspaces:/root/.jupyter/lab/workspaces
- ${ROOT_DIR}/.cache/torch:/root/.cache/torch - ${ROOT_DIR}/.cache/torch:/root/.cache/torch
- /opt/jupyter_gpu/data:/workspace/data
- ${ROOT_DIR}/cvtt:/cvtt - ${ROOT_DIR}/cvtt:/cvtt
- ${DATA_DIR}:/workspace/data
ports: ports:
- "${JUPYTER_PORT}:${JUPYTER_PORT}" - "${JUPYTER_PORT}:${JUPYTER_PORT}"
shm_size: "8gb" shm_size: "8gb"

View File

@ -10,7 +10,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": 9,
"id": "6b269e64-be58-43b5-ad60-0fbd1d37861a", "id": "6b269e64-be58-43b5-ad60-0fbd1d37861a",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
@ -51,19 +51,49 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"('3.10.13 (main, Sep 11 2023, 13:44:35) [GCC 11.2.0]',\n", "('3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]',\n",
" environ{'PATH': '/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',\n", " environ{'USER': 'oleg',\n",
" 'HOSTNAME': '6c24ffc52409',\n", " 'SSH_CLIENT': '100.102.18.30 39290 22',\n",
" 'JUPYTER_ENABLE_LAB': 'yes',\n", " 'XDG_SESSION_TYPE': 'tty',\n",
" 'PYTHONPATH': '/cvtt/prod',\n", " 'SHLVL': '1',\n",
" 'NVIDIA_VISIBLE_DEVICES': 'all',\n", " 'MOTD_SHOWN': 'pam',\n",
" 'NVIDIA_DRIVER_CAPABILITIES': 'compute,utility',\n", " 'HOME': '/home/oleg',\n",
" 'LD_LIBRARY_PATH': '/usr/local/nvidia/lib:/usr/local/nvidia/lib64',\n", " 'OLDPWD': '/home/oleg/.vscode-server',\n",
" 'PYTORCH_VERSION': '2.2.1',\n", " 'SSL_CERT_FILE': '/usr/lib/ssl/certs/ca-certificates.crt',\n",
" 'HOME': '/root',\n", " 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1000/bus',\n",
" 'LC_CTYPE': 'C.UTF-8',\n", " 'LOGNAME': 'oleg',\n",
" 'JPY_SESSION_NAME': '/workspace/Testing GPU.ipynb',\n", " '_': '/home/oleg/.pyenv/python3.10-venv/bin/python',\n",
" 'JPY_PARENT_PID': '1',\n", " 'XDG_SESSION_CLASS': 'user',\n",
" 'VSCODE_CLI_REQUIRE_TOKEN': 'a18f8694-adf8-4fa9-a860-a18b2bdb3d92',\n",
" 'XDG_SESSION_ID': '149',\n",
" 'PATH': '/home/oleg/.pyenv/python3.10-venv/bin:/home/oleg/.vscode-server/cli/servers/Stable-dc96b837cf6bb4af9cd736aa3af08cf8279f7685/server/bin/remote-cli:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin',\n",
" 'VSCODE_AGENT_FOLDER': '/home/oleg/.vscode-server',\n",
" 'XDG_RUNTIME_DIR': '/run/user/1000',\n",
" 'SSL_CERT_DIR': '/usr/lib/ssl/certs',\n",
" 'LANG': 'en_US.UTF-8',\n",
" 'SHELL': '/bin/bash',\n",
" 'PWD': '/home/oleg',\n",
" 'SSH_CONNECTION': '100.102.18.30 39290 100.102.233.115 22',\n",
" 'XDG_DATA_DIRS': '/home/oleg/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share',\n",
" 'VSCODE_HANDLES_SIGPIPE': 'true',\n",
" 'LS_COLORS': '',\n",
" 'LESSCLOSE': '/usr/bin/lesspipe %s %s',\n",
" 'LESSOPEN': '| /usr/bin/lesspipe %s',\n",
" 'LD_LIBRARY_PATH': '/usr/local/cuda/lib64',\n",
" 'VSCODE_AMD_ENTRYPOINT': 'vs/workbench/api/node/extensionHostProcess',\n",
" 'VSCODE_HANDLES_UNCAUGHT_ERRORS': 'true',\n",
" 'VSCODE_NLS_CONFIG': '{\"locale\":\"en\",\"osLocale\":\"en\",\"availableLanguages\":{}}',\n",
" 'BROWSER': '/home/oleg/.vscode-server/cli/servers/Stable-dc96b837cf6bb4af9cd736aa3af08cf8279f7685/server/bin/helpers/browser.sh',\n",
" 'VSCODE_CWD': '/home/oleg',\n",
" 'ELECTRON_RUN_AS_NODE': '1',\n",
" 'VSCODE_IPC_HOOK_CLI': '/run/user/1000/vscode-ipc-c5d6268a-2e45-4659-9523-6fcffb529a08.sock',\n",
" 'PYTHONUNBUFFERED': '1',\n",
" 'VIRTUAL_ENV': '/home/oleg/.pyenv/python3.10-venv',\n",
" 'PYTHONIOENCODING': 'utf-8',\n",
" 'VIRTUAL_ENV_PROMPT': '(python3.10-venv) ',\n",
" 'PS1': '(python3.10-venv) ',\n",
" 'PYDEVD_IPYTHON_COMPATIBLE_DEBUGGING': '1',\n",
" 'PYTHON_FROZEN_MODULES': 'on',\n",
" 'PYDEVD_USE_FRAME_EVAL': 'NO',\n", " 'PYDEVD_USE_FRAME_EVAL': 'NO',\n",
" 'TERM': 'xterm-color',\n", " 'TERM': 'xterm-color',\n",
" 'CLICOLOR': '1',\n", " 'CLICOLOR': '1',\n",
@ -82,7 +112,11 @@
], ],
"source": [ "source": [
"import sys\n", "import sys\n",
"sys.version,os.environ" "import os\n",
"\n",
"sys.path.append(\"/home/oleg/develop/cvtt2\")\n",
"sys.version,os.environ\n",
"\n"
] ]
}, },
{ {
@ -131,12 +165,12 @@
{ {
"data": { "data": {
"application/vnd.jupyter.widget-view+json": { "application/vnd.jupyter.widget-view+json": {
"model_id": "2b2a98cdd61d477b811279a6753630a2", "model_id": "4be0c8cc9c004ef6b32f044018434a85",
"version_major": 2, "version_major": 2,
"version_minor": 0 "version_minor": 0
}, },
"text/plain": [ "text/plain": [
"interactive(children=(IntSlider(value=5, description='x', max=10), Output()), _dom_classes=('widget-interact',…" "interactive(children=(IntSlider(value=5, description='x', max=1000), Output()), _dom_classes=('widget-interact…"
] ]
}, },
"metadata": {}, "metadata": {},
@ -152,7 +186,7 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"1717721060059418080" "1718155463838047267"
] ]
}, },
"execution_count": 12, "execution_count": 12,
@ -168,17 +202,27 @@
"def f(x):\n", "def f(x):\n",
" return x\n", " return x\n",
"\n", "\n",
"interact(f, x=IntSlider(min=0, max=10, step=1, value=5))\n", "interact(f, x=IntSlider(min=0, max=1000, step=1, value=5))\n",
"print(\"Done\")\n", "print(\"Done\")\n",
"tu.current_nanoseconds()" "tu.current_nanoseconds()"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 13,
"id": "f46e46a7-9b57-44aa-9bc9-dcbcf643bc88", "id": "f46e46a7-9b57-44aa-9bc9-dcbcf643bc88",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"jupyter_client==8.6.2\n",
"jupyter_core==5.7.2\n",
"jupyterlab_widgets==3.0.11\n"
]
}
],
"source": [ "source": [
"!pip freeze | grep jupyter" "!pip freeze | grep jupyter"
] ]
@ -200,7 +244,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.10.13" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@ -1,2 +1,3 @@
ROOT_DIR=/opt/jupyter_gpu/tensorflow ROOT_DIR=/opt/jupyter_gpu/tensorflow
DATA_DIR=/opt/jupyter_gpu/data
JUPYTER_PORT=9999 JUPYTER_PORT=9999

View File

@ -3,6 +3,7 @@ version: '3.8'
#================================================== #==================================================
# Relies on the file `.env` content for varables: # Relies on the file `.env` content for varables:
# ROOT_DIR # ROOT_DIR
# DATA_DIR
# JUPYTER_PORT # JUPYTER_PORT
#================================================== #==================================================
@ -10,7 +11,7 @@ services:
jupyter: jupyter:
# user: "oleg" # user: "oleg"
build: ${ROOT_DIR} build: ${ROOT_DIR}
image: cvtt/jupyter_gpu_tf:v1.0.5 image: cvtt/jupyter_gpu_tf:v1.0.6
container_name: jupyter_gpu_tf container_name: jupyter_gpu_tf
runtime: nvidia runtime: nvidia
environment: environment:
@ -20,7 +21,7 @@ services:
- ${ROOT_DIR}/notebooks:/workspace - ${ROOT_DIR}/notebooks:/workspace
- ${ROOT_DIR}/jupyter_settings/user-settings:/home/oleg/.jupyter/lab/user-settings - ${ROOT_DIR}/jupyter_settings/user-settings:/home/oleg/.jupyter/lab/user-settings
- ${ROOT_DIR}/jupyter_settings/workspaces:/home/oleg/.jupyter/lab/workspaces - ${ROOT_DIR}/jupyter_settings/workspaces:/home/oleg/.jupyter/lab/workspaces
- /opt/jupyter_gpu/data:/workspace/data - ${DATA_DIR}:/workspace/data
ports: ports:
- "${JUPYTER_PORT}:${JUPYTER_PORT}" - "${JUPYTER_PORT}:${JUPYTER_PORT}"
shm_size: "8gb" shm_size: "8gb"

File diff suppressed because one or more lines are too long

View File