{"id":24875781,"url":"https://github.com/yugoff/readme-bug-fixes-for-working-with-gpu","last_synced_at":"2026-06-22T02:31:30.124Z","repository":{"id":205970947,"uuid":"715532483","full_name":"yugoff/readme-bug-fixes-for-working-with-gpu","owner":"yugoff","description":"This file provides some solution to GPU-related errors","archived":false,"fork":false,"pushed_at":"2023-11-10T09:46:31.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-15T14:47:57.672Z","etag":null,"topics":["containerd","docker","docker-compose","gpu","nvidia","nvidia-gpu","toolkit"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yugoff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-11-07T10:34:44.000Z","updated_at":"2025-02-06T11:23:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"1a8490a9-0b7f-4520-8ecd-2776780a094a","html_url":"https://github.com/yugoff/readme-bug-fixes-for-working-with-gpu","commit_stats":null,"previous_names":["vv-yugoff/readme-bug-fixes-for-working-with-gpu","yugoff/readme-bug-fixes-for-working-with-gpu"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yugoff/readme-bug-fixes-for-working-with-gpu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yugoff%2Freadme-bug-fixes-for-working-with-gpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yugoff%2Freadme-bug-fixes-for-working-with-gpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yugoff%2Freadme-bug-fixes-for-working-with-gpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yugoff%2Freadme-bug-fixes-for-working-with-gpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yugoff","download_url":"https://codeload.github.com/yugoff/readme-bug-fixes-for-working-with-gpu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yugoff%2Freadme-bug-fixes-for-working-with-gpu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34632513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containerd","docker","docker-compose","gpu","nvidia","nvidia-gpu","toolkit"],"created_at":"2025-02-01T08:17:52.847Z","updated_at":"2026-06-22T02:31:30.109Z","avatar_url":"https://github.com/yugoff.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bug fixes for working with gpu\n\n## Возможные ошибки и их исправления.\n\n### 1. Команда для запуска контейнера в Docker с доступом к графическому процессору (GPU) с использованием NVIDIA: \n\t\n\t```bash\n\t   sudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi\n\t```\n\t\n\t+-----------------------------------------------------------------------------+\n\t| NVIDIA-SMI 535.86.10    Driver Version: 535.86.10    CUDA Version: 12.2     |\n\t|-------------------------------+----------------------+----------------------+\n\t| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |\n\t| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |\n\t|                               |                      |               MIG M. |\n\t|===============================+======================+======================|\n\t|   0  Tesla T4            On   | 00000000:00:1E.0 Off |                    0 |\n\t| N/A   34C    P8     9W /  70W |      0MiB / 15109MiB |      0%      Default |\n\t|                               |                      |                  N/A |\n\t+-------------------------------+----------------------+----------------------+\n\n\t+-----------------------------------------------------------------------------+\n\t| Processes:                                                                  |\n\t|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |\n\t|        ID   ID                                                   Usage      |\n\t|=============================================================================|\n\t|  No running processes found                                                 |\n\t+-----------------------------------------------------------------------------+\n\t\n\tЕсли вывод не в виде таблицы и возникают ошибки, рекомендуется выполнить следующие действия:\n\t\n\t1.1. Удалите пакет NVIDIA Container Toolkit:\n\t\n\t```bash\n\t   sudo apt remove nvidia-container-toolkit\n\t```\n\t\n\t1.2. Удалите пакеты Docker и containerd:\n\t\n\t```bash\n\t   sudo apt remove docker-ce docker-ce-cli containerd.io\n\t```\n\t\n\t1.3. Базовая процедура установки Docker:\n\t\n\t```bash\n\t   sudo apt update\n\t   sudo apt install apt-transport-https ca-certificates curl software-properties-common\n\t   curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\n\t   sudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable\"\n\t   sudo apt update\n\t   sudo apt install docker-ce docker-ce-cli containerd.io\n\t```\n\t\n\t1.4. Базовая процедура установки NVIDIA Container Toolkit:\n\t\n\t```bash\n\t   distribution=$(. /etc/os-release;echo $ID$VERSION_ID)\n\t   curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -\n\t   curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list\n\t   sudo apt update\n\t   sudo apt install nvidia-docker2\n\t   sudo systemctl restart docker\n\t```\n\t\n\t1.5. Настройка NVIDIA runtime с containerd:\n\t\n\t```bash\n\t   sudo nvidia-ctk runtime configure --runtime=containerd\n\t```\n\t\n\t1.6. Перезапустк службы containerd с новыми настройками:\n\t\n\t```bash\n\t   sudo systemctl restart containerd\n\t```\n\t\n\t1.7. Повторить следующую команду:\n\t\n\t```bash\n\t   sudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi\n\t```\n\t\n### 2. Ошибка с нехваткой видеопамяти на компьютере:\n\n***Tried to allocate 2.01 GiB (GPU 0; 3.78 GiB total capacity; 2.46 GiB already allocated; 481.06 MiB free; 2.49 GiB reserved in total by PyTorch) If reserved memory is \u003e\u003e allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF***\n\t\n\t2.1. Останавливаем работающие контейнеры:\n\t\n\t```bash\n\t   docker-compose down   \n\t```\n\t\n\t2.2. Удаляем контейнер:\n\t\n\t```bash\n\t   docker rm vl_server   \n\t```\n\t\n\t2.3. Запуск контейнера с приложением на Streamlit с использованием docker-compose, с пересборкой образа, в фоновом режиме:\n\t\n\t```bash\n\t   STREAMLIT=1 docker-compose up --build -d   \n\t```\n\t\n### 3. Ошибка ModuleNotFoundError: No module named 'altait.vegalite.v4'\n\n\t3.1. Заходим в контейнер:\n\t\n\t```bash\n\t   docker exec -it vl_server bash\n\t```\n\t\n\t3.2. Скачиваем в контейнер модуль:\n\t\n\t```bash\n\t   pip install altair==4   \n\t```\n\t\n\t3.3. Выходим из контейнера:\n\t\n\t```bash\n\t   exit   \n\t```\n\t\n\t3.4. Останавливаем контейнер:\n\t\n\t```bash\n\t   docker stop vl_server   \n\t```\n\t\n\t3.5. Запускаем контейнеры:\n\t\n\t```bash\n\t   STREAMLIT=1 docker-compose up -d   \n\t```\n\n### 4. Ошибка из-за превышения время ожидания при перезапуске службы containered (*sudo systemctl restart containerd*):\n\n***Job for containerd.service failed because a timeout was exceeded.\nSee \"systemctl status containerd.service\" and \"journalctl -xeu containerd.service\" for details.***\n\n\t4.1. Для решения проблемы нужно перейти к решению ошибок 1.1-1.7\n\n### 5. Ошибка http: invalid Host header (при запуске командой STREAMLIT=1 docker-compose up -d)\n\n\t5.1. Запуск контейнера:\n\t\n\t```bash\n\t   STREAMLIT=1 docker compose up --build -d\n\t```\n\t\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyugoff%2Freadme-bug-fixes-for-working-with-gpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyugoff%2Freadme-bug-fixes-for-working-with-gpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyugoff%2Freadme-bug-fixes-for-working-with-gpu/lists"}