{"id":320152,"date":"2021-03-24T09:00:31","date_gmt":"2021-03-24T09:00:31","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=320152"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=320152","title":{"rendered":"\u041f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e Docker-\u043e\u0431\u0440\u0430\u0437\u0430 \u0434\u043b\u044f \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/d4\/lo\/iz\/d4loizpwl-mtp_h_f7podqasmv0.png\"><\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <a href=\"https:\/\/mcs.mail.ru\/\">Mail.ru Cloud Solutions<\/a> \u043f\u0435\u0440\u0435\u0432\u0435\u043b\u0430 \u043f\u043e\u043b\u043d\u043e\u0435 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u0430 Docker (GPU \u0438\u043b\u0438 CPU) \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u0434\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u0414\u0430\u043b\u0435\u0435 \u0442\u0435\u043a\u0441\u0442 \u043e\u0442 \u043b\u0438\u0446\u0430 \u0430\u0432\u0442\u043e\u0440\u0430.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Docker-\u043e\u0431\u0440\u0430\u0437\u0430 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0449\u0430\u044f \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0438 \u0442. \u0434. \u041d\u043e \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0438 \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u0439 Docker-\u043e\u0431\u0440\u0430\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u0438\u0437\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430, \u0430 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044e \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432 \u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0432 \u043e\u0431\u0440\u0430\u0437\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0439. \u042f \u0438\u0441\u0445\u043e\u0436\u0443 \u0438\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043e\u0431 \u043e\u0431\u0449\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 Docker;<\/li>\n<li>\u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c Docker;<\/li>\n<li>\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0435 Dockerfile.<a name=\"habracut\"><\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"obschie-rekomendacii-po-sborke-docker-obraza\">\u041e\u0431\u0449\u0438\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0431\u043e\u0440\u043a\u0435 Docker-\u043e\u0431\u0440\u0430\u0437\u0430<\/h2>\n<p>  <\/p>\n<p>\u0415\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u043c \u043b\u0443\u0447\u0448\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0430\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/docs.docker.com\/develop\/develop-images\/dockerfile_best-practices\/\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e Docker<\/a>, \u043d\u043e \u044f \u0445\u043e\u0447\u0443 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<ol>\n<li>\n<p>\u0424\u0430\u0439\u043b requirements.txt \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0430\u043a\u0435\u0442\u0430 Python. \u041d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u0430, \u0438\u043d\u0430\u0447\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0430\u043a\u0435\u0442 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430, \u0430 \u043f\u043e\u043b\u044c\u0437\u044b \u043e\u0442 Docker \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/36\/5-\/wi\/365-wihwkzds_vqd6biwjhoy0bq.jpeg\"><br \/>  <em><a href=\"https:\/\/twitter.com\/abhi1thakur\/status\/1357346972630351874\/photo\/1\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/em><\/p>\n<p>  <\/li>\n<li>\n<p>\u0412\u0441\u0435\u0433\u0434\u0430 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b RUN, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 Docker (\u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u043d, \u044d\u0442\u043e \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0441\u0442\u0430\u0442\u044c\u0438).<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">RUN apt update &amp;&amp; \\ apt install --no-install-recommends -y build-essential gcc curl      ca-certificates python3 &amp;&amp; \\ apt clean &amp;&amp; rm -rf \/var\/lib\/apt\/lists\/*<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441 pip \u0444\u043b\u0430\u0433 <code>--no-cache-dir<\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">RUN pip install --no-cache-dir --user -r \/req.txt<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 .dockerignore, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0435\u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0441\u0431\u043e\u0440\u043a\u0438. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a .gitignore.<\/p>\n<p>  <\/li>\n<li>\n<p>\u041f\u043e \u043c\u0435\u0440\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 slim-\u0432\u0435\u0440\u0441\u0438\u044e \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>python:buster-slim<\/code>, <code>debian:buster-slim<\/code> \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. <\/p>\n<p>  <\/li>\n<li>\n<p>\u0418\u0437\u0431\u0435\u0433\u0430\u0439\u0442\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 Docker-\u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Alpine. \u0417\u0432\u0443\u0447\u0438\u0442 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0432\u043e, \u043d\u043e \u043f\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u043e\u043d\u0438 \u043f\u043b\u043e\u0445\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 Python. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0432 \u044d\u0442\u043e\u0439 <a href=\"https:\/\/pythonspeed.com\/articles\/alpine-docker-python\/\">\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<p>  <\/li>\n<\/ol>\n<p>  <\/p>\n<h2 id=\"sborka-docker-obraza-dlya-lyubogo-proekta-na-python-cpu\">\u0421\u0431\u043e\u0440\u043a\u0430 Docker-\u043e\u0431\u0440\u0430\u0437\u0430 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 Python (CPU)<\/h2>\n<p>  <\/p>\n<p>\u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0435\u043b\u0430\u044e\u0442 \u043d\u0430 Python, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0430\u0436\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 Docker-\u043e\u0431\u0440\u0430\u0437\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430.<\/p>\n<p>  <\/p>\n<h3 id=\"odnoetapnaya-sborka\">\u041e\u0434\u043d\u043e\u044d\u0442\u0430\u043f\u043d\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430<\/h3>\n<p>  <\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0432\u0441\u0435 \u0437\u0430\u0434\u0430\u0447\u0438. \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439: \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u041e\u0421, \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0430\u043a\u0435\u0442\u044b, \u0437\u0430\u0434\u0430\u0439\u0442\u0435 \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0430 (\u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e) \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0434\u043d\u043e\u044d\u0442\u0430\u043f\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 Docker:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">FROM python:3.8-slim  RUN apt update &amp;&amp; \\     apt install --no-install-recommends -y build-essential gcc &amp;&amp; \\     apt clean &amp;&amp; rm -rf \/var\/lib\/apt\/lists\/* COPY .\/req.txt \/req.txt COPY .\/src \/src  RUN pip3 install --no-cache-dir -r \/req.txt CMD ['python3', '\/src\/app.py'] EXPOSE 8080<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u044d\u0442\u0438 \u043f\u0430\u043a\u0435\u0442\u044b:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/46\/zq\/ok\/46zqok-njqrg7ynvgmf6nbdoc0c.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>docker build<\/code> \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0437\u0430 \u0431\u044b\u043b 1,64 \u0413\u0431:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mh\/wz\/i7\/mhwzi731uqavkuxveimmil0ybbk.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u043e\u044d\u0442\u0430\u043f\u043d\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430 \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432. \u042d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u043d\u043e \u0443 \u043d\u0435\u0435 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 Python. \u0412\u0430\u0436\u043d\u043e c apt \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u043b\u0430\u0433 <code>--no-install-recommends<\/code>, \u0430 \u0441 pip \u2014 \u0444\u043b\u0430\u0433 <code>--no-cache-dir<\/code>. \u041d\u0430\u043c \u043d\u0435 \u043d\u0430\u0434\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043a\u044d\u0448, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u043d\u0438 \u0434\u043b\u044f \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043d\u0438 \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b. \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c CI\/CD-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 (\u0432\u0440\u043e\u0434\u0435 Github action) \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430, \u0442\u043e \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435.<\/p>\n<p>  <\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Python \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0421. \u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043b\u0438\u0448\u044c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. \u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 <code>pip install<\/code> \u0432\u0441\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u0430 \u0437\u0430\u0442\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u041d\u0443\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c bash-\u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0415\u0441\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0441\u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430. \u042d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e, \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u0442\u0430\u0440\u0430\u044e\u0442\u0441\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0438 \u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u0432 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044e \u0431\u043e\u043b\u0435\u0435 \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u0435 \u043e\u0431\u0440\u0430\u0437\u044b. \u041d\u043e \u043d\u0430\u043c \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043c\u043d\u043e\u0433\u043e\u044d\u0442\u0430\u043f\u043d\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u043e\u0431\u0440\u0430\u0437\u0430 (Docker multi-stage builds). <\/p>\n<p>  <\/p>\n<h3 id=\"mnogoetapnaya-sborka\">\u041c\u043d\u043e\u0433\u043e\u044d\u0442\u0430\u043f\u043d\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430<\/h3>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0449\u0438\u0439 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 Dockerfile, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0443\u0445\u0438\u0449\u0440\u0435\u043d\u0438\u044f \u0441 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u043e\u0439 \u0438 \u043f\u0440\u043e\u0447\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0443\u0440\u043e\u0432\u043d\u0438 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0438 \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0431\u044b\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u044b \u0435\u043c\u0443 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u043c\u043d\u043e\u0433\u043e\u044d\u0442\u0430\u043f\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435 \u0432\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0435 \u0432 Dockerfile \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f <code>FROM<\/code>. \u041a\u0430\u0436\u0434\u0430\u044f \u0442\u0430\u043a\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0443\u044e \u043e\u0441\u043d\u043e\u0432\u0443, \u0438 \u043a\u0430\u0436\u0434\u0430\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u044d\u0442\u0430\u043f \u0441\u0431\u043e\u0440\u043a\u0438. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u0442\u0430\u043f\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439, \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044f \u0432\u0441\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u043e\u0431\u0440\u0430\u0437\u0435.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\"># Stage 1: Builder\/Compiler FROM python:3.7-slim as builder RUN apt update &amp;&amp; \\     apt install --no-install-recommends -y build-essential gcc COPY req.txt \/req.txt  RUN pip install --no-cache-dir --user -r \/req.txt  # Stage 2: Runtime FROM debian:buster-slim RUN apt update &amp;&amp; \\     apt install --no-install-recommends -y build-essential python3 &amp;&amp; \\     apt clean &amp;&amp; rm -rf \/var\/lib\/apt\/lists\/* COPY --from=builder \/root\/.local\/lib\/python3.7\/site-packages \/usr\/local\/lib\/python3.7\/dist-packages COPY .\/src \/src CMD ['python3', '\/src\/app.py'] EXPOSE 8080<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rb\/pg\/qx\/rbpgqx8wikeizjaxpl9orneinqw.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 Docker-\u043e\u0431\u0440\u0430\u0437\u0430 \u0441\u0442\u0430\u043b 1,61 \u0413\u0431 \u0432\u043c\u0435\u0441\u0442\u043e 1,64. \u0412\u0440\u043e\u0434\u0435 \u0431\u044b \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043d\u0435\u0432\u0435\u043b\u0438\u043a\u0430, \u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0439 \u043c\u043d\u043e\u0433\u043e. \u041f\u0440\u043e\u0431\u0435\u0436\u0438\u043c\u0441\u044f \u043f\u043e \u043d\u0438\u043c.<\/p>\n<p>  <\/p>\n<p>\u0421\u0442\u0440\u043e\u043a\u0438 \u0441 1 \u043f\u043e 5 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u044d\u0442\u0430\u043f\u0443 \u2014 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Python: \u043e\u043d\u0438 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u0430 \u0437\u0430\u0442\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u0421, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0434\u0430\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 gcc. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u044d\u0442\u0430\u043f\u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 (runtime) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">COPY --from=&lt;stage 1&gt; stage1\/src stage2\/destination<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u043e, \u043a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435, \u0440\u0430\u0437\u043c\u0435\u0440 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u0441\u044f \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e. \u0421 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u044f\u0437\u044b\u043a\u0430\u043c\u0438 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0439, \u043d\u043e \u0443 Python \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u043e\u043a\u0443\u0441\u043e\u0432 \u0432 \u0437\u0430\u043f\u0430\u0441\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u043d\u043e\u0433\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 .whl-\u0444\u0430\u0439\u043b\u043e\u0432, \u044d\u0442\u043e \u0444\u043e\u0440\u043c\u0430\u0442 wheel \u0438\u0437 PyPi, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/li>\n<li>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u044d\u0442\u0430\u043f\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435 \u043d\u0435\u0433\u0434\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u043d\u0430 Python? <strong>\u0421\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0432\u0435\u0440\u043d\u043e!<\/strong> \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u0438\u0437 PyPi \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d \u0432 .whl, \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0435\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 tar.gz (\u0441\u0436\u0430\u0442\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e tarballs), \u0438 \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0417\u0434\u0435\u0441\u044c \u043c\u043d\u043e\u0433\u043e\u044d\u0442\u0430\u043f\u043d\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e-\u0441\u0432\u043e\u0435\u043c\u0443.<\/p>\n<p>  <\/li>\n<li>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u043d\u043e\u0433\u043e\u044d\u0442\u0430\u043f\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u0430, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435 Python-\u043f\u0430\u043a\u0435\u0442 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430, \u043b\u0438\u0431\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e setup.py \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  <\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0430\u0438\u0432\u0430\u044e, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u044d\u0442\u0443 <a href=\"https:\/\/realpython.com\/python-wheels\/\">\u0441\u0442\u0430\u0442\u044c\u044e<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0430\u0442 wheels \u0432 Python.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yw\/_o\/g3\/yw_og31bzurs0xy60cxo4jt0em4.jpeg\"><\/p>\n<p>  <\/li>\n<li>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 req.txt, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 wheel, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u043d\u0438 \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u044b. \u041d\u043e \u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0430\u043a\u0435\u0442 \u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430, \u0442\u043e \u0432\u044b \u043f\u043e\u0442\u0435\u0440\u044f\u0435\u0442\u0435 \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435.<\/p>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"sborka-docker-obraza-dlya-lyubogo-proekta-na-python-gpu\">\u0421\u0431\u043e\u0440\u043a\u0430 Docker-\u043e\u0431\u0440\u0430\u0437\u0430 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 Python (GPU)<\/h2>\n<p>  <\/p>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0442\u044c Docker-\u043e\u0431\u0440\u0430\u0437 \u0434\u043b\u044f CPU \u043d\u0435\u0442\u0440\u0443\u0434\u043d\u043e, \u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u043a\u0430\u0436\u0435\u0448\u044c \u043e \u0441\u0431\u043e\u0440\u043a\u0435 \u043e\u0431\u0440\u0430\u0437\u0430 \u0434\u043b\u044f GPU. \u0415\u0441\u043b\u0438 \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f, \u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439. \u042f \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0443\u0441\u044c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043d\u0435 \u0431\u0443\u0434\u0443 \u043a\u0430\u0441\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043e\u0440\u0438\u0438 (\u0434\u0443\u043c\u0430\u044e, \u044d\u0442\u043e \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0441\u0442\u0430\u0442\u044c\u0438).<\/p>\n<p>  <\/p>\n<h3 id=\"neobhodimye-usloviya\">\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f<\/h3>\n<p>  <\/p>\n<p>TensorFlow \u0438 Pytorch \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u0438\u0434\u0435\u043e\u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b Nvidia CUDA. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430 \u0445\u043e\u0441\u0442\u043e\u0432\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0441\u0432\u0435\u0436\u0438\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b Nvidia \u0438 CUDA, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e cuDNN (\u043d\u0435 \u0431\u0443\u0434\u0443 \u0437\u0434\u0435\u0441\u044c \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c).<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <a href=\"https:\/\/github.com\/NVIDIA\/nvidia-docker\">nvidia-docker2<\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0434\u0432\u0438\u0436\u043a\u0443 Docker \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0432\u0438\u0434\u0435\u043e\u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430\u043c Nvidia.<\/p>\n<p>  <\/p>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u2014 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e\/\u0442\u0435\u0433 CUDA, cuDNN \u0434\u043b\u044f Nvidia-Docker-\u043e\u0431\u0440\u0430\u0437\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0443\u0434\u0430 TensorFlow\/Pytorch. \u0422\u043e\u0433\u0434\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0443. \u041f\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u043c \u0441\u043e\u0432\u0435\u0442\u044b:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0432 Docker-\u043e\u0431\u0440\u0430\u0437\u0435 \u0442\u0435 \u0436\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 CUDA \u0438 cuDNN, \u0447\u0442\u043e \u0438 \u043d\u0430 \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435.<\/li>\n<li>\u041d\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0439\u0442\u0435 \u0431\u0435\u0437\u0434\u0443\u043c\u043d\u043e \u0441\u0430\u043c\u0443\u044e \u0441\u0432\u0435\u0436\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 TensorFlow\/Pytorch \u0438\u0437 PyPi. \u042d\u0442\u043e \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043b\u044e\u0431\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u044d\u0442\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043b\u044e\u0431\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 CUDA \u0438 cuDNN. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 TensorFlow\/Pytorch \u0438 CUDA\/cuDNN. \u0412\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u044d\u0442\u043e \u0432 \u0441\u0440\u0435\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/li>\n<li>\u0421\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435: \u0432 Docker-\u0445\u0430\u0431\u0435 Nvidia \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u0442\u0430\u043a \u0447\u0442\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0438\u0442\u0435\u0441\u044c \u0432 \u0438\u0445 \u0442\u0435\u0433\u0430\u0445 \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e Docker-\u0445\u0430\u0431\u0430 Nvidia:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/nn\/ee\/xn\/nneexnlo8buk5iohlrohwyapyj0.jpeg\"><br \/>  <em><a href=\"https:\/\/hub.docker.com\/r\/nvidia\/cuda\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/em><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043d\u043e\u0432\u0430 \u0438 runtime, \u0430 \u043d\u0435 \u0441\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u044b \u043d\u0430 \u0441\u0440\u0435\u0434\u0435 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438. \u041a\u0430\u043a \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u0442\u0435\u0433? \u0427\u0438\u0442\u0430\u0439\u0442\u0435 \u043d\u0438\u0436\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"odnoetapnaya-sborka-1\">\u041e\u0434\u043d\u043e\u044d\u0442\u0430\u043f\u043d\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0435\u0433\u0430 \u0435\u0441\u0442\u044c \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u044f \u0441\u043b\u0435\u0434\u0443\u044e.<\/p>\n<p>  <\/p>\n<ol>\n<li>\n<p>\u0428\u0430\u0433 1: \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0432\u0435\u0440\u0441\u0438\u044e CUDA \u0438 cuDNN \u043d\u0430 \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bi\/ge\/mt\/bigemtvxmu7mz9hxp_tq_dtg7ua.jpeg\"><br \/>  <em>\u0423 \u043c\u0435\u043d\u044f CUDA 10.1 \u0438 cuDNN 7.5<\/em><\/p>\n<p>  <\/li>\n<li>\n<p>\u0428\u0430\u0433 2: \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0448\u0430\u0433\u0430 1 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0435\u0440\u0441\u0438\u044e Docker-\u043e\u0431\u0440\u0430\u0437\u0430. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e <code>nvidia\/cuda:10.1-cudnn7-runtime<\/code>. \u041f\u043e\u0447\u0435\u043c\u0443 runtime? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u0438 CUDA, \u0438 cuDNN.<\/p>\n<p>  <\/li>\n<li>\n<p>\u0428\u0430\u0433 3: \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e TensorFlow\/Pytorch, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430 \u0441 \u0432\u0430\u0448\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 CUDA \u0438 cuDNN. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e TensorFlow 2.20.<\/p>\n<p>  <\/li>\n<\/ol>\n<p>  <\/p>\n<p><strong>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/strong>: Docker-\u043e\u0431\u0440\u0430\u0437 \u043e\u0442 Nvidia \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0442\u0430\u0440\u0448\u0435 Ubuntu (18.04 \u0438\u043b\u0438 16.04), \u0438 \u0442\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Python 3.6. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0438 Python \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438. \u041f\u043e\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0434\u043d\u043e\u044d\u0442\u0430\u043f\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 Docker-\u043e\u0431\u0440\u0430\u0437\u0430 (GPU):<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">FROM nvidia\/cuda:10.1-cudnn7-runtime  RUN apt update &amp;&amp; \\     apt install --no-install-recommends -y build-essential software-properties-common &amp;&amp; \\     add-apt-repository -y ppa:deadsnakes\/ppa &amp;&amp; \\     apt install --no-install-recommends -y python3.8 python3-pip python3-setuptools python3-distutils &amp;&amp; \\     apt clean &amp;&amp; rm -rf \/var\/lib\/apt\/lists\/*  COPY req.txt \/req.txt COPY .\/src \/src RUN python3.8 -m pip install --upgrade pip &amp;&amp; \\     python3.8 -m pip install --no-cache-dir -r \/req.txt CMD ['python3', '\/src\/app.py'] EXPOSE 8080<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/strong>: \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 Docker-\u043e\u0431\u0440\u0430\u0437\u0430 \u043e\u0442 Nvidia \u043b\u0435\u0436\u0438\u0442 Ubuntu 18.04, \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0432\u043d\u0435\u0441\u0442\u0438 \u043f\u0440\u0430\u0432\u043a\u0443 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c TensorFlow 2.2.0.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/df\/ik\/q0\/dfikq0epojovvoq7phfqngwppey.jpeg\"><br \/>  <em>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e TensorFlow \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0443<\/em><\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/oy\/go\/xl\/oygoxlfm1isfaydgpwphaqgoj7s.jpeg\"><br \/>  <em>\u0420\u0430\u0437\u043c\u0435\u0440 Docker-\u043e\u0431\u0440\u0430\u0437\u0430 \u043f\u0440\u0438 \u043e\u0434\u043d\u043e\u044d\u0442\u0430\u043f\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435<\/em><\/p>\n<p>  <\/p>\n<h3 id=\"mnogoetapnaya-sborka-1\">\u041c\u043d\u043e\u0433\u043e\u044d\u0442\u0430\u043f\u043d\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430<\/h3>\n<p>  <\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0438\u0441\u0430\u043d \u0432 \u0433\u043b\u0430\u0432\u0435 2.2. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u0430\u0447\u0430\u0435\u043c \u0438 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u044b Python, \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u0430\u043f (runtime). \u0422\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0441\u043e\u0432\u0435\u0442\u0430\u043c\u0438 \u0438\u0437 \u0433\u043b\u0430\u0432\u044b 3.2.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u043d\u043e\u0433\u043e\u044d\u0442\u0430\u043f\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 Docker-\u043e\u0431\u0440\u0430\u0437\u0430 (GPU):<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\"># Stage 1: Builder\/Compiler FROM python:3.8-slim as builder RUN apt update &amp;&amp; \\     apt install --no-install-recommends -y build-essential gcc COPY req.txt \/req.txt  RUN pip install --no-cache-dir --user -r \/req.txt  # Stage 2: Runtime FROM nvidia\/cuda:10.1-cudnn7-runtime  RUN apt update &amp;&amp; \\     apt install --no-install-recommends -y build-essential software-properties-common &amp;&amp; \\     add-apt-repository -y ppa:deadsnakes\/ppa &amp;&amp; \\     apt install --no-install-recommends -y python3.8 python3-distutils &amp;&amp; \\     update-alternatives --install \/usr\/bin\/python3 python3 \/usr\/bin\/python3.6 1 &amp;&amp; \\     update-alternatives --install \/usr\/bin\/python3 python3 \/usr\/bin\/python3.8 2 &amp;&amp; \\     apt clean &amp;&amp; rm -rf \/var\/lib\/apt\/lists\/* COPY --from=builder \/root\/.local\/lib\/python3.8\/site-packages \/usr\/local\/lib\/python3.8\/dist-packages COPY .\/src \/src CMD ['python3', '\/src\/app.py'] EXPOSE 8080<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/strong>: \u0447\u0442\u043e\u0431\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Python 3.8, \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043a\u043e\u0435-\u043a\u0430\u043a\u043e\u0439 \u043a\u043e\u0434. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u044d\u0442\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u0435.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/v9\/oa\/22\/v9oa22_qb_9ef4jwsul5xltysbm.jpeg\"><br \/>  <em>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e TensorFlow \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0443<\/em><\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rb\/cu\/qx\/rbcuqx57o3z2ilk7kypss2luaqg.jpeg\"><br \/>  <em>\u0420\u0430\u0437\u043c\u0435\u0440 Docker-\u043e\u0431\u0440\u0430\u0437\u0430 \u043f\u0440\u0438 \u043c\u043d\u043e\u0433\u043e\u044d\u0442\u0430\u043f\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435<\/em><\/p>\n<p>  <\/p>\n<p>\u0421\u043d\u043e\u0432\u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u0445 \u043d\u0435\u0432\u0435\u043b\u0438\u043a\u0430, \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0442\u0435 \u0436\u0435, \u0447\u0442\u043e \u0438 \u0432 \u0433\u043b\u0430\u0432\u0435 2.2. \u041e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u044d\u0442\u0430\u043f\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443, \u043e\u043d\u0430 \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c.<\/p>\n<p>  <\/p>\n<h2 id=\"issleduem-docker-obraz-s-pomoschyu-dive\">\u0418\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c Docker-\u043e\u0431\u0440\u0430\u0437 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Dive<\/h2>\n<p>  <\/p>\n<p>\u0414\u0430\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0441 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u0438 \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/wagoodman\/dive\">Dive<\/a> \u2014 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0441\u043b\u043e\u0435\u0432 \u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 Docker\/OCI-\u043e\u0431\u0440\u0430\u0437\u0430. \u0423 \u043d\u0435\u0433\u043e \u043d\u0430 GitHub \u0431\u043e\u043b\u044c\u0448\u0435 24 \u0442\u044b\u0441. \u0437\u0432\u0435\u0437\u0434. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043e\u043d \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442 \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0423 Dive \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430\u044f \u0442\u0440\u0430\u0442\u0430 \u043c\u0435\u0441\u0442\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435,<\/li>\n<li>\u043e\u0446\u0435\u043d\u043a\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0437\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u043e \u0435\u0433\u043e \u043b\u0443\u0447\u0448\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u2014 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u043b\u044e\u0431\u044b\u043c CI-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c. \u0414\u043b\u044f \u043e\u0431\u0435\u0438\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c <a href=\"https:\/\/github.com\/wagoodman\/dive#ci-integration\">\u0443\u0441\u043b\u043e\u0432\u0438\u0435<\/a>, \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u0442\u043e \u0438 CI-\u0437\u0430\u0434\u0430\u0447\u0430 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0432\u0435\u0440\u044f\u0442\u044c Docker-\u043e\u0431\u0440\u0430\u0437\u0443, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e CI-\u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>  <\/p>\n<h2 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u041d\u0430\u0448\u0430 \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u2014 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 Docker-\u043e\u0431\u0440\u0430\u0437\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043b\u044e\u0431\u043e\u0439 \u043e\u0431\u0440\u0430\u0437 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0442\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u043c. \u0412\u0441\u0435\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0430\u043c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u044d\u0442\u0430\u043f\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443 \u0438 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u043f\u043e\u0434 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432 \u0441\u0440\u0435\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u0435\u0449\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e \u0442\u0435\u043c\u0435:<\/p>\n<p>  <\/p>\n<ol>\n<li><a href=\"https:\/\/mcs.mail.ru\/blog\/formaty-faylov-v-bolshikh-dannykh-kratkiy-likbez\">\u041a\u0430\u043a\u0438\u0435 \u0431\u044b\u0432\u0430\u044e\u0442 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043a\u0430\u043a \u0438\u0445 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c<\/a>.<\/li>\n<li><a href=\"https:\/\/mcs.mail.ru\/blog\/razvernutyvanie-kubeflow-v-prodakshen-klastere-kubernetes\">MlOps \u0431\u0435\u0437 \u0431\u043e\u043b\u0438 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435: \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c Kubeflow \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Kubernetes<\/a>.<\/li>\n<li><a href=\"https:\/\/t.me\/zavtra_oblachno\">\u041d\u0430\u0448 \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c-\u043a\u0430\u043d\u0430\u043b \u043f\u0440\u043e \u0446\u0438\u0444\u0440\u043e\u0432\u0443\u044e \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0431\u0438\u0437\u043d\u0435\u0441\u0430<\/a>.<\/li>\n<\/ol>\n<\/div>\n<p> \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\/company\/mailru\/blog\/548480\/\"> https:\/\/habr.com\/ru\/company\/mailru\/blog\/548480\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/d4\/lo\/iz\/d4loizpwl-mtp_h_f7podqasmv0.png\"><\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <a href=\"https:\/\/mcs.mail.ru\/\">Mail.ru Cloud Solutions<\/a> \u043f\u0435\u0440\u0435\u0432\u0435\u043b\u0430 \u043f\u043e\u043b\u043d\u043e\u0435 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u0430 Docker (GPU \u0438\u043b\u0438 CPU) \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u0434\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u0414\u0430\u043b\u0435\u0435 \u0442\u0435\u043a\u0441\u0442 \u043e\u0442 \u043b\u0438\u0446\u0430 \u0430\u0432\u0442\u043e\u0440\u0430.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Docker-\u043e\u0431\u0440\u0430\u0437\u0430 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0449\u0430\u044f \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0438 \u0442. \u0434. \u041d\u043e \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0438 \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u0439 Docker-\u043e\u0431\u0440\u0430\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u0438\u0437\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430, \u0430 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044e \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432 \u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0432 \u043e\u0431\u0440\u0430\u0437\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0439. \u042f \u0438\u0441\u0445\u043e\u0436\u0443 \u0438\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043e\u0431 \u043e\u0431\u0449\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 Docker;<\/li>\n<li>\u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c Docker;<\/li>\n<li>\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0435 Dockerfile.<br \/>\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-320152","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320152","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=320152"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320152\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=320152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=320152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=320152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}