This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
• mkdir /tmp/resnet | |
– создаем дирректорию. | |
• curl -s https://storage.googleapis.com/download.tensorflow.org/models/official/20181001_resnet/savedmodels/resnet_v2_fp32_savedmodel_NHWC_jpg.tar.gz | tar --strip-components=2 -C /tmp/resnet -xvz | |
- копируем архив с моделью по ссылке в созданную директорию и разархивируем его. | |
• docker pull tensorflow/serving | |
- загружаем docker образ с tensorflow serving. | |
• docker run -p 8501:8501 --name tfserving_resnet \ | |
--mount type=bind,source=/tmp/resnet,target=/models/resnet \ | |
-e MODEL_NAME=resnet -t tensorflow/serving & | |
- монтируем контейнер из загруженного образа с доступом через порт 8501 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Инструкция по настройке Django-приложения на сервере | |
1. Подключаем услугу VPS c операционной системой Ubuntu (например, на reg.ru). | |
2. Проверяем подключение по SSH (в терминале: ssh root@ip). | |
3. Проверяем подключение по ftp (выбираем ftp-клиента исходя из своей операционной системы и вкуса). | |
4. Устанавливаем нужную версию интерпретатора python согласно инструкции через ssh. | |
https://tecadmin.net/install-python-3-8-ubuntu/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import time | |
import requests | |
import pandas as pd | |
from airflow import DAG | |
from airflow.operators.dummy_operator import DummyOperator | |
from airflow.operators.python_operator import PythonOperator | |
from airflow.models import Variable | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"attachments": { | |
"98545d9b-cfbb-46c5-b45a-60eddbb6b6b5.png": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAANAAAACJCAIAAADSRyEcAAAAA3NCSVQICAjb4U/gAAAgAElEQVR4nOy9d7xeVZU+vtbe+5S3335z0zupBAKEEqSI0mQQFBS7jm2U0bGXsY36FeuIZey9MgwKYqELARIISSAkISH1pt5e33vfes7Za/3+2Oec9703BEEHJ+pvfyjJW857ynPWep5nrb0PMjP8ow9mBmACYEQJiPXvkV+k6hBVh3V1hL08BUXQVSYfUKCwUSXQSgu7UbrNwmkSdiMKOXHTGpgBBQJO2vI/5sB/YMDFOIN6lASlHn90lz+yzR/dGYzv1+Ueqo5wUGLygAIAAgYABkAAAERAgcIC6QorK90WmZqhcgvsxqVWw1KVnSdUovZrrP9/5P1DAo6ZgYEJhTIvkJevDmyq9j5YHVgf5PfoyiCThygAFQoLhAIUAAIAQ5zVbctsAJiANVDA7AMFgAJVWqam280r3PaznfazrYaF0Y8TMAFK/IeE3T8Y4JgZCAAQJQCQX6j0PFA+9Ltq39qgcIjJQ2mjdBEtRsEMzADACIxIIvovACMCMDAgAzIjATILAgQQiIAAgIysWVdZV4EJ7Qa7abk7/aLEjEvthkXhvhhcovi/Ox3/B+MfB3DMTABoLrA3sr3YeWP50O+C/F4AQpVE4TAKYgAmgWRhoEQgkQBAs/S0qpJd1bZPVsBSs0AAhdoSgS09R3i28C0RIBIzBqx8Upolg0BEgQwUkC6x9oTd6LSfmZp7TWLGpcJKQQi7f6Bo9w8BODZEDQUAlLvXFHZ9v9J9D3l5oVKoXGZBzAhkC9+WPgKXAneo0tBdbj1SbO8ptQ1UGke9XFEnKtr1taVBMAhAEEAKtSP9pKpkrUKTM9qeGJyW7JuW7G13B7PWuBI6IOWRHbBEF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime, timedelta | |
from airflow import DAG | |
from airflow.operators.bash_operator import BashOperator | |
from airflow.operators.docker_operator import DockerOperator | |
from airflow.operators.python_operator import BranchPythonOperator, PythonOperator, PythonVirtualenvOperator | |
from airflow.operators.dummy_operator import DummyOperator | |
import os | |
default_args = { | |
'owner' : 'dimon', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def main_flask_function(): | |
return 'Hello world!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import request, Flask | |
import json | |
app = Flask(__name__) | |
@app.route('/', methods=['GET', 'POST']) | |
def main_flask_function(): | |
if request.method == 'POST': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import time | |
import pandas as pd | |
from airflow import DAG | |
from airflow.operators.python_operator import PythonOperator, PythonVirtualenvOperator | |
from airflow.operators.postgres_operator import PostgresOperator | |
from airflow.models import Variable | |
import psycopg2 | |
import os | |
import sys |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer