{"id":369947,"date":"2024-05-21T04:14:41","date_gmt":"2024-05-21T04:14:41","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=369947"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T04:14:41","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=369947","title":{"rendered":"<span>\u041a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435?<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/6e1\/7a4\/7a5\/6e17a47a5c5443b30e9a80327492e176.jpg\" width=\"1024\" height=\"1024\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6e1\/7a4\/7a5\/6e17a47a5c5443b30e9a80327492e176.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435, \u0432\u0435\u0434\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0442. \u0422\u043e\u0442 \u0436\u0435 Google Collab \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u043b\u0438\u043c\u0438\u0442\u044b \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e GPU, \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0436\u0434\u0430\u0442\u044c \u0441\u0443\u0442\u043a\u0438. \u0410 \u0446\u0435\u043d\u0430 \u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u0440\u043e\u0439 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u0430&#8230; \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u044f \u043d\u0435\u043f\u043b\u043e\u0445\u0430\u044f \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430, \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c\u0443 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0443.\u00a0\u00a0<\/p>\n<p>\u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0447\u0442\u043e GPU \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438\u0437-\u0437\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442 \u2014 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0435 \u043a \u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0432 \u0441\u0432\u043e\u0435\u043e\u0431\u0440\u0430\u0437\u043d\u0443\u044e \u0444\u0435\u0440\u043c\u0443.\u00a0<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043a\u0430\u043a \u0436\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0432\u043e\u0435\u0433\u043e GPU?\u00a0<\/p>\n<p><strong>\u0412\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f:<\/strong><\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 cuDNN \u043f\u043e\u0434 TensorFlow. \u041e\u043d\u0430 \u043d\u0443\u0436\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044f\u0434\u0440\u0430\u043c \u0441\u0432\u043e\u0435\u0439 \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438. \u041a\u0441\u0442\u0430\u0442\u0438, Pytorch \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GPU \u0442\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0423\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0438 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 Jupyter \u0432 .py \u0444\u0430\u0439\u043b\u044b.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u0443\u043a\u0430\u0437\u0430\u0432 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0441\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 requirements.txt. \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c Docker-\u043e\u0431\u0440\u0430\u0437\u0430, \u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e, \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0433\u0434\u0435 \u0432\u0430\u0448\u0435\u0439 \u0434\u0443\u0448\u0435 \u0443\u0433\u043e\u0434\u043d\u043e \u0441 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435\u043c CUDA.<\/p>\n<\/li>\n<\/ol>\n<h3>\u0421\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 cuDNN \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c CUDA<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0432\u043e\u0438\u043c GPU \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f CUDA Toolkit, \u0438\u043d\u0430\u0447\u0435 CUDA \u2013 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u0423 Nvidia \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044f\u0434\u0435\u0440 \u2013 cuDNN. \u0410 \u0435\u0449\u0435 \u043c\u044b \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0437\u0430\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438.\u00a0<\/p>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0440\u0435\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441 cuDNN?<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 Geforce Experience. \u0418 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u0430\u043c Toolkit \u0442\u0443\u0442: <a href=\"https:\/\/developer.nvidia.com\/cuda-toolkit-archive\" rel=\"noopener noreferrer nofollow\"><u>Toolkit \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 CuDNN<\/u><\/a>.\u00a0<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u2014\u00a0 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 \u0431\u0435\u0437 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 Visual Studio:<\/p>\n<pre><code class=\"python\">import tensorflow as tf from tensorflow.python.client import device_lib  print(tf.test.is_built_with_cuda()) #\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b CUDA  print(tf.sysconfig.get_build_info(), \"\\n\") #static numbers sys_details = tf.sysconfig.get_build_info() print('Prescribed CUDA version:', sys_details[\"cuda_version\"]) #\u0432\u0435\u0440\u0441\u0438\u044f CUDA  print('Prescribed cuDNN version:', sys_details[\"cudnn_version\"], \"\\n\") #\u0432\u0435\u0440\u0441\u0438\u044f CUDNN  print(tf.reduce_sum(tf.random.normal([1000, 1000]))) #\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u0432 print(tf.config.list_physical_devices('GPU'), \"\\n\") #\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\/GPU  print(device_lib.list_local_devices())<\/code><\/pre>\n<p><em>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0430\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f ML. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c TensorFlow. \u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 TensorFlow \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430\u043c\u0438 \u0438\u043b\u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 GPU, \u0442\u0430\u043a \u0447\u0442\u043e \u0431\u0443\u0434\u044c\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f TF \u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442 \u043d\u0430 Windows \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0441\u0430\u043c\u043e\u0433\u043e Python \u043e\u0442 3.7 \u0434\u043e 3.10 \u2014 2.10.0\u00a0<\/em><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 pip.<em> <\/em>\u041e\u0431\u044b\u0447\u043d\u043e Pip \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0435 Python \u0434\u043b\u044f Windows.\u00a0<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438: <em>Pandas, Matplotlib \u0438 Numpy.<\/em><\/p>\n<pre><code class=\"python\">pip install tensorflow-gpu==2.10.0  pip install numpy pandas matplotlib <\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c GPU. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 MNIST.\u00a0<\/p>\n<pre><code class=\"python\">import keras import numpy as np from keras.models import Sequential from keras.layers import Dense, Flatten, Conv2D, MaxPooling2D, Dropout from keras.datasets import mnist import sys  # import tensorflow as tf # config = tf.compat.v1.ConfigProto(gpu_options =  #                          tf.compat.v1.GPUOptions(per_process_gpu_memory_fraction=0.8) # # device_count = {'GPU': 1} # ) # config.gpu_options.allow_growth = True # session = tf.compat.v1.Session(config=config) # tf.compat.v1.keras.backend.set_session(session)   def one_hot(data, num_categories):     oh = np.zeros((len(data),num_categories))     for i,entry in enumerate(data):         oh[i, entry] = 1     return oh   # \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 (x_train, y_train), (x_test, y_test) = mnist.load_data() # \u0414\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 x_train = x_train.reshape( (60000,28,28,1) ) \/ 256 x_test = x_test.reshape( (10000,28,28,1) ) \/ 256 y_train = one_hot(y_train, 10) y_test = one_hot(y_test, 10)  # \u0421\u0442\u0440\u043e\u0438\u043c \u0441\u0430\u043c\u0443 \u043c\u043e\u0434\u0435\u043b\u044c model = Sequential() input_shape=(28,28,1) model.add(Conv2D(filters=32,                  kernel_size=(3,3),                  activation='relu',                  input_shape=input_shape)) model.add(MaxPooling2D(pool_size=(2,2),                        strides=(2,2))) model.add(Conv2D(filters=32,                  kernel_size=(3,3),                  activation='relu')) model.add(MaxPooling2D(pool_size=(2,2),                        strides=(2,2))) model.add(Flatten()) model.add(Dropout(0.5)) model.add(Dense(units=256,                 activation='relu')) model.add(Dropout(0.5)) model.add(Dense(units=10,                 activation='softmax'))  # load model weight  # \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c model.compile(loss='categorical_crossentropy',               optimizer='adam',               metrics=['accuracy']) model.summary()  # \u041e\u0431\u0443\u0447\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c num_epochs = 1 if num_epochs != 0:      model.fit(x_train, y_train,               batch_size=4,               epochs=num_epochs)  # \u0414\u0435\u043b\u0430\u0435\u043c \u043e\u0446\u0435\u043d\u043a\u0443 score = model.evaluate(x_test, y_test) print('\\nScore: ', score)<\/code><\/pre>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e. \u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0441\u0442\u043e\u0438\u0442 \u0446\u0435\u043b\u0430\u044f \u0440\u0435\u043d\u0434\u0435\u0440-\u0444\u0435\u0440\u043c\u0430 \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u2013 \u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u0441\u0442\u0440\u043e\u043a\u0435:  <code>\u201c# device_count = {'GPU': 1}\u201d<\/code>.  <\/p>\n<p>\u0412 \u0441\u0442\u0440\u043e\u043a\u0435 \u0432\u044b\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438.\u00a0\u00a0<\/p>\n<p>\u041f\u0443\u0441\u0442\u044c \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 .py \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f <em>model<\/em> \u2013 \u0442\u0430\u043a \u043c\u044b \u0435\u0435 \u0438 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c.\u00a0<\/p>\n<p>\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u0435\u043c, \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u044f\u0434\u0440\u0430\u043c\u0438. \u0427\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u043c \u041f\u041a, \u043d\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c Docker-\u0444\u0430\u0439\u043b.\u00a0 \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u043c \u0432 \u043d\u0430\u0448 \u201c\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u201d.\u00a0<\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 Python<\/h3>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u2013 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u0435\u0439\u0448\u0438\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u044d\u0442\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0412\u043e\u0442 \u201c\u043d\u0430\u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u201d \u0432\u044b \u043a\u0438\u043b\u043e\u0442\u043e\u043d\u043d\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0432 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0430 \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0441 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u041f\u041a? \u0412\u043e\u0442 \u0437\u0434\u0435\u0441\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043d\u0435 \u0437\u0430\u0441\u043e\u0440\u044f\u044f \u0441\u0440\u0435\u0434\u0443, \u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043a\u0430\u043c\u0438 (\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441 \u043b\u044e\u0431\u043e\u0439 \u041e\u0421, \u0431\u0443\u0434\u044c \u0442\u043e Linux \u0438\u043b\u0438 Windows).\u00a0<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0435\u0449\u0435 \u043f\u0440\u043e\u0449\u0435, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u2013 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043a \u0432\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c\/\u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430.\u00a0<\/p>\n<p>\u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432\u0435\u0434\u044c \u0431\u044b\u0432\u0430\u044e\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439\u2026 \u0422\u0430 \u0436\u0435 TensorFlow \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430\u043c\u0438. \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0443 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0443\u0436\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e, \u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u043d\u043e\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0435, \u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.\u00a0<\/p>\n<p>\u041d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u044b\u0448\u0435.\u00a0<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u043b\u044f Windows.\u00a0<\/p>\n<p>1. \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434.\u00a0<\/p>\n<p><code>python3 -m venv myenv<\/code>  <\/p>\n<p><em>Myenv \u2013 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0438\u0440\u0442. \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0441\u043e\u0431\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.\u00a0<\/em><\/p>\n<p>2. \u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u041e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.\u00a0<\/p>\n<p><code>myenv\\Scripts\\activate<\/code>  <\/p>\n<p>3. \u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 pip, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043b\u0438 \u0432\u044b\u0448\u0435, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e, \u0441 \u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u043f\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p><code>(myenv) user@host:~$ pip install tensorflow-gpu==2.10.0<\/code>  <\/p>\n<p>4. \u0422\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0430\u0448\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439. \u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u041f\u041a \u0431\u044b\u043b\u043e \u0431\u044b \u043b\u0435\u0433\u043a\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c.  <\/p>\n<p><code>pip freeze > requirements.txt<\/code>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 requirements \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0442\u043e\u043d \u0432 \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 \u043a\u043e\u0434\u0435\u0440\u043e\u0432. \u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 \u043b\u044e\u0431\u043e\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 GitHub \u0438 \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0442\u0430\u043a\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0438\u043a \u0432\u0448\u0438\u0442.\u00a0<\/p>\n<p>\u0424\u0430\u0439\u043b \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u043f\u0435\u0440\u0435\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u0430\u0448\u0435\u043c\u0443 \u0434\u0440\u0443\u0433\u0443, \u0430 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u0441\u043a\u0438\u043d\u0443\u0442\u044c \u0435\u043c\u0443 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 .py \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0438 \u0441\u0430\u043c \u0444\u0430\u0439\u043b \u0441 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0441\u043c\u043e\u0433 \u043f\u0435\u0440\u0435\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\/\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435.\u00a0<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0443\u0436\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u0434\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u0440\u0438\u0432\u0435\u043b\u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0433\u043b\u0430\u0432\u0435. \u0418 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u0441\u0435 \u0432\u0430\u0448\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 Jupyter \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0432 \u0444\u0430\u0439\u043b\u044b \u043f\u0438\u0442\u043e\u043d\u0430 .py \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e.\u00a0<\/p>\n<p>\u0414\u043b\u044f Linux c\u0445\u0435\u043c\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0445\u043e\u0436\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u043b\u0435\u0433\u043a\u0430 \u0432\u0438\u0434\u043e\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434.\u00a0<\/p>\n<h3>Docker \u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f\u00a0<\/h3>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ec6\/9e2\/5ad\/ec69e25adcb21faff88ba74234961719.png\" width=\"1200\" height=\"630\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ec6\/9e2\/5ad\/ec69e25adcb21faff88ba74234961719.png\"\/><\/figure>\n<p>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0430\u0448\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441 \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435\u2026 \u041d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0435\u0433\u043e \u0435\u0449\u0435 Docker-\u0444\u0430\u0439\u043b\u043e\u043c. \u042d\u0442\u0438 \u0436\u0435 \u0434\u043e\u043a\u0435\u0440\u044b \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0445\u043e\u0441\u0442\u0430.\u00a0 \u0414\u043e\u0431\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0438\u0437-\u0437\u0430 \u0441\u0432\u043e\u0435\u0439 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u043e\u0441\u0442\u0438 \u0444\u0430\u0439\u043b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0436\u0435\u043b\u0435\u0437\u0430.\u00a0<\/p>\n<p>\u0418\u043d\u0430\u0447\u0435 \u0434\u043e\u043a\u0435\u0440 \u2013 \u043d\u0435\u043a\u043e\u0435 \u043f\u043e\u0434\u043e\u0431\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b.\u00a0<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 Docker, \u043d\u0430\u0447\u043d\u0438\u0442\u0435 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0435\u0433\u043e \u043d\u0430 \u0432\u0430\u0448\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <a href=\"https:\/\/www.docker.com\/\" rel=\"noopener noreferrer nofollow\"><u>Docker Desktop<\/u><\/a> \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430 Docker. \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u0432\u043e\u0435\u0433\u043e CUDA \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>nvcc - version<\/code> (\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435).  <\/p>\n<p>\u0418 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0432\u0435\u0440\u0441\u0438\u044e cuDNN. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0438 Docker \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0443. \u0412\u0441\u0435 \u0436\u0435 \u0445\u043e\u0441\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0432\u0430\u0448 \u041f\u041a.\u00a0 \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e Docker-\u043e\u0431\u0440\u0430\u0437\u0430 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0432\u0430\u0448\u0438\u043c\u0438 cuDNN \u0438 CUDA \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438: <code>nvidia\/cuda:10.1-cudnn7-runtime<\/code>\u00a0<\/p>\n<p>\u0421\u0430\u043c Dockerfile \u2013 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.\u00a0 \u0414\u043e\u043a\u0435\u0440-\u0444\u0430\u0439\u043b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e.\u00a0<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0430\u0448\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0432\u0441\u0435\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 (\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432 <code>requirements.txt<\/code>) \u0438 c\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 .py \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0430\u043c\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.\u00a0<\/p>\n<p><strong>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 Model.py \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438.\u00a0<\/strong><\/p>\n<p><code>FROM<\/code> &#8212; \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0430\u0448 \u043e\u0431\u0440\u0430\u0437 Docker. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u0438\u0437 Docker Hub \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e python. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0435\u0433\u043e \u0437\u0430\u0448\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>RUN<\/code>.<\/p>\n<p><code>RUN apt-get update &amp;&amp; \\<br \/>apt-get install -y python3<\/code>  <\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0430\u043f\u043a\u0438 \u0438 \u0444\u0430\u0439\u043b\u044b (\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f) \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. <\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>COPY<\/code>.\u00a0<\/p>\n<p><code>COPY model.py \/ home\/ Model.py<\/code>  <\/p>\n<p><code>COPY requirements.txt \/ home \/ requirements.txt<\/code>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438).<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b RUN \u0447\u0435\u0440\u0435\u0437 pip.<\/p>\n<p><code>RUN pip install package1 package2 package3<\/code>  <\/p>\n<p>\u0418\u043b\u0438 \u0436\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0448\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c requirements.txt.  <\/p>\n<p><code>RUN pip install -r requirements.txt<\/code>  <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u041f\u0438\u0442\u043e\u043d\u0435 \u0441 \u0433\u043e\u0442\u043e\u0432\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0438 \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0441 \u0444\u0430\u0439\u043b\u0430 <em>requirements.txt\u00a0<\/em><\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432 \u043d\u0430\u0448\u0435\u043c \u0434\u043e\u043a\u0435\u0440-\u0444\u0430\u0439\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u043f\u0438\u0442\u043e\u043d\u0435, \u0442\u043e \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u043f\u0438\u0441\u0430\u0442\u044c:<\/p>\n<p><code>ENTRYPOINT [\"\/usr\/bin\/python3\", \".\/model.py\"]<\/code> <\/p>\n<p><em>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <\/em><code>CMD<\/code><em>. \u041d\u0435\u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u043d\u0430\u0448\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f ENTRYPOINT (\u0432\u0445\u043e\u0434\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430), \u043e\u0442\u0441\u044e\u0434\u0430 \u043d\u0430\u0447\u043d\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.<\/em><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0430\u043c Docker.\u00a0<\/p>\n<p><code>docker build -t model<\/code>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 <em>model <\/em>\u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u0435\u0441\u0442\u043e, \u043a\u0443\u0434\u0430 Docker \u043f\u043e\u043b\u043e\u0436\u0438\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.\u00a0<\/p>\n<p><strong>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c GPU \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432,<\/strong> \u044d\u0442\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435:<\/p>\n<p><code>docker run --gpus=all -it model<\/code><\/p>\n<p>\u0413\u0434\u0435 model \u2013 \u0438\u043c\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0438\u043b\u0438 \u0435\u0433\u043e id. \u0410 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 &#8212;gpus=all \u2013 \u0434\u043b\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c\u0441\u044f GPU-\u0440\u0435\u0441\u0443\u0440\u0441\u044b.\u00a0<\/p>\n<h3>Docker \u0438 \u043f\u0435\u0440\u0435\u043a\u0438\u0434\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 \u0438 requirements.txt?<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 cuDNN \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0432\u0435\u0440\u0441\u0438\u0438 TensorFlow \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0430\u0448\u0443 \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u041f\u041a \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c GPU,\u00a0 \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u043a\u0438\u0434\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u041f\u041a \u2013 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0443\u0442\u043e\u0440\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0438\u0437 \u0434\u043e\u043c\u0430, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443.\u00a0<\/p>\n<p>\u041d\u043e \u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u043a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438, \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e, \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u0440\u0443\u043f\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0435. \u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0435 GPU \u043f\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0443, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u043b\u044e\u0431\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/798019\/\"> https:\/\/habr.com\/ru\/articles\/798019\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435, \u0432\u0435\u0434\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0442. \u0422\u043e\u0442 \u0436\u0435 Google Collab \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u043b\u0438\u043c\u0438\u0442\u044b \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e GPU, \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0436\u0434\u0430\u0442\u044c \u0441\u0443\u0442\u043a\u0438. \u0410 \u0446\u0435\u043d\u0430 \u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u0440\u043e\u0439 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u0430&#8230; \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u044f \u043d\u0435\u043f\u043b\u043e\u0445\u0430\u044f \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430, \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c\u0443 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0443.\u00a0\u00a0<\/p>\n<p>\u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0447\u0442\u043e GPU \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438\u0437-\u0437\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442 \u2014 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0435 \u043a \u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0432 \u0441\u0432\u043e\u0435\u043e\u0431\u0440\u0430\u0437\u043d\u0443\u044e \u0444\u0435\u0440\u043c\u0443.\u00a0<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043a\u0430\u043a \u0436\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0432\u043e\u0435\u0433\u043e GPU?\u00a0<\/p>\n<p><strong>\u0412\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f:<\/strong><\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 cuDNN \u043f\u043e\u0434 TensorFlow. \u041e\u043d\u0430 \u043d\u0443\u0436\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044f\u0434\u0440\u0430\u043c \u0441\u0432\u043e\u0435\u0439 \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438. \u041a\u0441\u0442\u0430\u0442\u0438, Pytorch \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GPU \u0442\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0423\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0438 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 Jupyter \u0432 .py \u0444\u0430\u0439\u043b\u044b.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u0443\u043a\u0430\u0437\u0430\u0432 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0441\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 requirements.txt. \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c Docker-\u043e\u0431\u0440\u0430\u0437\u0430, \u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e, \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0433\u0434\u0435 \u0432\u0430\u0448\u0435\u0439 \u0434\u0443\u0448\u0435 \u0443\u0433\u043e\u0434\u043d\u043e \u0441 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435\u043c CUDA.<\/p>\n<\/li>\n<\/ol>\n<h3>\u0421\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 cuDNN \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c CUDA<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0432\u043e\u0438\u043c GPU \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f CUDA Toolkit, \u0438\u043d\u0430\u0447\u0435 CUDA \u2013 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u0423 Nvidia \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044f\u0434\u0435\u0440 \u2013 cuDNN. \u0410 \u0435\u0449\u0435 \u043c\u044b \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0437\u0430\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438.\u00a0<\/p>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0440\u0435\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441 cuDNN?<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 Geforce Experience. \u0418 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u0430\u043c Toolkit \u0442\u0443\u0442: <a href=\"https:\/\/developer.nvidia.com\/cuda-toolkit-archive\" rel=\"noopener noreferrer nofollow\"><u>Toolkit \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 CuDNN<\/u><\/a>.\u00a0<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u2014\u00a0 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 \u0431\u0435\u0437 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 Visual Studio:<\/p>\n<pre><code class=\"python\">import tensorflow as tf from tensorflow.python.client import device_lib  print(tf.test.is_built_with_cuda()) #\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b CUDA  print(tf.sysconfig.get_build_info(), \"\\n\") #static numbers sys_details = tf.sysconfig.get_build_info() print('Prescribed CUDA version:', sys_details[\"cuda_version\"]) #\u0432\u0435\u0440\u0441\u0438\u044f CUDA  print('Prescribed cuDNN version:', sys_details[\"cudnn_version\"], \"\\n\") #\u0432\u0435\u0440\u0441\u0438\u044f CUDNN  print(tf.reduce_sum(tf.random.normal([1000, 1000]))) #\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0435\u043d\u0437\u043e\u0440\u043e\u0432 print(tf.config.list_physical_devices('GPU'), \"\\n\") #\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\/GPU  print(device_lib.list_local_devices())<\/code><\/pre>\n<p><em>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0430\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f ML. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c TensorFlow. \u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 TensorFlow \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430\u043c\u0438 \u0438\u043b\u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 GPU, \u0442\u0430\u043a \u0447\u0442\u043e \u0431\u0443\u0434\u044c\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f TF \u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442 \u043d\u0430 Windows \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0441\u0430\u043c\u043e\u0433\u043e Python \u043e\u0442 3.7 \u0434\u043e 3.10 \u2014 2.10.0\u00a0<\/em><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 pip.<em> <\/em>\u041e\u0431\u044b\u0447\u043d\u043e Pip \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0435 Python \u0434\u043b\u044f Windows.\u00a0<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438: <em>Pandas, Matplotlib \u0438 Numpy.<\/em><\/p>\n<pre><code class=\"python\">pip install tensorflow-gpu==2.10.0  pip install numpy pandas matplotlib <\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c GPU. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 MNIST.\u00a0<\/p>\n<pre><code class=\"python\">import keras import numpy as np from keras.models import Sequential from keras.layers import Dense, Flatten, Conv2D, MaxPooling2D, Dropout from keras.datasets import mnist import sys  # import tensorflow as tf # config = tf.compat.v1.ConfigProto(gpu_options =  #                          tf.compat.v1.GPUOptions(per_process_gpu_memory_fraction=0.8) # # device_count = {'GPU': 1} # ) # config.gpu_options.allow_growth = True # session = tf.compat.v1.Session(config=config) # tf.compat.v1.keras.backend.set_session(session)   def one_hot(data, num_categories):     oh = np.zeros((len(data),num_categories))     for i,entry in enumerate(data):         oh[i, entry] = 1     return oh   # \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 (x_train, y_train), (x_test, y_test) = mnist.load_data() # \u0414\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 x_train = x_train.reshape( (60000,28,28,1) ) \/ 256 x_test = x_test.reshape( (10000,28,28,1) ) \/ 256 y_train = one_hot(y_train, 10) y_test = one_hot(y_test, 10)  # \u0421\u0442\u0440\u043e\u0438\u043c \u0441\u0430\u043c\u0443 \u043c\u043e\u0434\u0435\u043b\u044c model = Sequential() input_shape=(28,28,1) model.add(Conv2D(filters=32,                  kernel_size=(3,3),                  activation='relu',                  input_shape=input_shape)) model.add(MaxPooling2D(pool_size=(2,2),                        strides=(2,2))) model.add(Conv2D(filters=32,                  kernel_size=(3,3),                  activation='relu')) model.add(MaxPooling2D(pool_size=(2,2),                        strides=(2,2))) model.add(Flatten()) model.add(Dropout(0.5)) model.add(Dense(units=256,                 activation='relu')) model.add(Dropout(0.5)) model.add(Dense(units=10,                 activation='softmax'))  # load model weight  # \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c model.compile(loss='categorical_crossentropy',               optimizer='adam',               metrics=['accuracy']) model.summary()  # \u041e\u0431\u0443\u0447\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c num_epochs = 1 if num_epochs != 0:      model.fit(x_train, y_train,               batch_size=4,               epochs=num_epochs)  # \u0414\u0435\u043b\u0430\u0435\u043c \u043e\u0446\u0435\u043d\u043a\u0443 score = model.evaluate(x_test, y_test) print('\\nScore: ', score)<\/code><\/pre>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e. \u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0441\u0442\u043e\u0438\u0442 \u0446\u0435\u043b\u0430\u044f \u0440\u0435\u043d\u0434\u0435\u0440-\u0444\u0435\u0440\u043c\u0430 \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u2013 \u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u0441\u0442\u0440\u043e\u043a\u0435:  <code>\u201c# device_count = {'GPU': 1}\u201d<\/code>.  <\/p>\n<p>\u0412 \u0441\u0442\u0440\u043e\u043a\u0435 \u0432\u044b\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438.\u00a0\u00a0<\/p>\n<p>\u041f\u0443\u0441\u0442\u044c \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 .py \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f <em>model<\/em> \u2013 \u0442\u0430\u043a \u043c\u044b \u0435\u0435 \u0438 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c.\u00a0<\/p>\n<p>\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u0435\u043c, \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u044f\u0434\u0440\u0430\u043c\u0438. \u0427\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u043c \u041f\u041a, \u043d\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c Docker-\u0444\u0430\u0439\u043b.\u00a0 \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u043c \u0432 \u043d\u0430\u0448 \u201c\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u201d.\u00a0<\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 Python<\/h3>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u2013 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u0435\u0439\u0448\u0438\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u044d\u0442\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0412\u043e\u0442 \u201c\u043d\u0430\u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u201d \u0432\u044b \u043a\u0438\u043b\u043e\u0442\u043e\u043d\u043d\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0432 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0430 \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0441 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u041f\u041a? \u0412\u043e\u0442 \u0437\u0434\u0435\u0441\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043d\u0435 \u0437\u0430\u0441\u043e\u0440\u044f\u044f \u0441\u0440\u0435\u0434\u0443, \u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043a\u0430\u043c\u0438 (\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441 \u043b\u044e\u0431\u043e\u0439 \u041e\u0421, \u0431\u0443\u0434\u044c \u0442\u043e Linux \u0438\u043b\u0438 Windows).\u00a0<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0435\u0449\u0435 \u043f\u0440\u043e\u0449\u0435, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u2013 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043a \u0432\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c\/\u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430.\u00a0<\/p>\n<p>\u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432\u0435\u0434\u044c \u0431\u044b\u0432\u0430\u044e\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439\u2026 \u0422\u0430 \u0436\u0435 TensorFlow \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430\u043c\u0438. \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0443 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0443\u0436\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e, \u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u043d\u043e\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0435, \u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.\u00a0<\/p>\n<p>\u041d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u044b\u0448\u0435.\u00a0<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u043b\u044f Windows.\u00a0<\/p>\n<p>1. \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434.\u00a0<\/p>\n<p><code>python3 -m venv myenv<\/code>  <\/p>\n<p><em>Myenv \u2013 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0438\u0440\u0442. \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c. \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0441\u043e\u0431\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.\u00a0<\/em><\/p>\n<p>2. \u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u041e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.\u00a0<\/p>\n<p><code>myenv\\Scripts\\activate<\/code>  <\/p>\n<p>3. \u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 pip, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043b\u0438 \u0432\u044b\u0448\u0435, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e, \u0441 \u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u043f\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p><code>(myenv) user@host:~$ pip install tensorflow-gpu==2.10.0<\/code>  <\/p>\n<p>4. \u0422\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0430\u0448\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439. \u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u041f\u041a \u0431\u044b\u043b\u043e \u0431\u044b \u043b\u0435\u0433\u043a\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c.  <\/p>\n<p><code>pip freeze > requirements.txt<\/code>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 requirements \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0442\u043e\u043d \u0432 \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 \u043a\u043e\u0434\u0435\u0440\u043e\u0432. \u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 \u043b\u044e\u0431\u043e\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 GitHub \u0438 \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0442\u0430\u043a\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0438\u043a \u0432\u0448\u0438\u0442.\u00a0<\/p>\n<p>\u0424\u0430\u0439\u043b \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u043f\u0435\u0440\u0435\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u0430\u0448\u0435\u043c\u0443 \u0434\u0440\u0443\u0433\u0443, \u0430 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u0441\u043a\u0438\u043d\u0443\u0442\u044c \u0435\u043c\u0443 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 .py \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0438 \u0441\u0430\u043c \u0444\u0430\u0439\u043b \u0441 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0441\u043c\u043e\u0433 \u043f\u0435\u0440\u0435\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\/\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435.\u00a0<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0443\u0436\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u0434\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u0440\u0438\u0432\u0435\u043b\u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0433\u043b\u0430\u0432\u0435. \u0418 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u0441\u0435 \u0432\u0430\u0448\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 Jupyter \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0432 \u0444\u0430\u0439\u043b\u044b \u043f\u0438\u0442\u043e\u043d\u0430 .py \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e.\u00a0<\/p>\n<p>\u0414\u043b\u044f Linux c\u0445\u0435\u043c\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0445\u043e\u0436\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u043b\u0435\u0433\u043a\u0430 \u0432\u0438\u0434\u043e\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434.\u00a0<\/p>\n<h3>Docker \u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f\u00a0<\/h3>\n<figure class=\"full-width\"><\/figure>\n<p>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0430\u0448\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441 \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435\u2026 \u041d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0435\u0433\u043e \u0435\u0449\u0435 Docker-\u0444\u0430\u0439\u043b\u043e\u043c. \u042d\u0442\u0438 \u0436\u0435 \u0434\u043e\u043a\u0435\u0440\u044b \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0445\u043e\u0441\u0442\u0430.\u00a0 \u0414\u043e\u0431\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0438\u0437-\u0437\u0430 \u0441\u0432\u043e\u0435\u0439 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u043e\u0441\u0442\u0438 \u0444\u0430\u0439\u043b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0436\u0435\u043b\u0435\u0437\u0430.\u00a0<\/p>\n<p>\u0418\u043d\u0430\u0447\u0435 \u0434\u043e\u043a\u0435\u0440 \u2013 \u043d\u0435\u043a\u043e\u0435 \u043f\u043e\u0434\u043e\u0431\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b.\u00a0<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0435 \u043d\u0435\u0442 Docker, \u043d\u0430\u0447\u043d\u0438\u0442\u0435 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0435\u0433\u043e \u043d\u0430 \u0432\u0430\u0448\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <a href=\"https:\/\/www.docker.com\/\" rel=\"noopener noreferrer nofollow\"><u>Docker Desktop<\/u><\/a> \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430 Docker. \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u0432\u043e\u0435\u0433\u043e CUDA \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>nvcc - version<\/code> (\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435).  <\/p>\n<p>\u0418 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0432\u0435\u0440\u0441\u0438\u044e cuDNN. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0438 Docker \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0443. \u0412\u0441\u0435 \u0436\u0435 \u0445\u043e\u0441\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0432\u0430\u0448 \u041f\u041a.\u00a0 \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e Docker-\u043e\u0431\u0440\u0430\u0437\u0430 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0432\u0430\u0448\u0438\u043c\u0438 cuDNN \u0438 CUDA \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438: <code>nvidia\/cuda:10.1-cudnn7-runtime<\/code>\u00a0<\/p>\n<p>\u0421\u0430\u043c Dockerfile \u2013 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.\u00a0 \u0414\u043e\u043a\u0435\u0440-\u0444\u0430\u0439\u043b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e.\u00a0<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0430\u0448\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0432\u0441\u0435\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 (\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432 <code>requirements.txt<\/code>) \u0438 c\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 .py \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0430\u043c\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.\u00a0<\/p>\n<p><strong>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f<\/strong><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-369947","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/369947","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=369947"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/369947\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=369947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=369947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=369947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}