StoryCode

'전체 글'에 해당되는 글 570건

  1. docker-compose, models.config, http 테스트 호출
  2. Extension & Tip
  3. Visual Studio Code.TSC

docker-compose, models.config, http 테스트 호출

인공지능,AI,학습,ML,Tensorflow, Cafee2,MLFlow/Tensorflow
반응형

docker-compose.yml

    tfsservice:
        build:
            context: .
            dockerfile: Dockerfile.tfs
        image: tensorflow/serving
        container_name: tfs
        hostname: tfs
        command:
            - '--model_config_file=/models/models.config'
            - '--model_config_file_poll_wait_seconds=60'
        volumes:
            - ./volume.tfs/models:/models/
        ports:
            - 8500:8500
            - 8501:8501
        networks:
            - backend

 

models.config

git clone https://github.com/tensorflow/serving


model_config_list:
{
    config:
    {
        name:"serving"
        base_path:"/models/serving/tensorflow_serving/servables/tensorflow/testdata/saved_model_half_plus_two_cpu"
        model_platform: "tensorflow"
    }
}

 

command line >

curl -d '{"instances": [1.0, 2.0, 5.0]}' -X POST http://localhost:8501/v1/models/serving:predict 
{ 
    "predictions": [2.5, 3.0, 4.5 
    ] 
}


v1/models 는 디폴트로 입력
serving 은 models.config 의 name

 

반응형

Extension & Tip

Visual Studio Code
반응형

 

 

 

 

 

 

 

 

 

Ctrl + ~ ( = ` )

 

 

Ctrl + Space

 

 

Peek & Find

 

 

 

Paste Json as Code

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

참조 : www.youtube.com/watch?v=u21W_tfPVrY

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

반응형

'Visual Studio Code' 카테고리의 다른 글

Remote.SSH.연결.편집  (0) 2023.03.26
설정.Nuget.Offline Nuget Without internet  (0) 2021.08.02
설정.Nuget 설정  (0) 2021.08.02
Replace. \n 제거등을 위해 입력법  (0) 2020.11.15

Visual Studio Code.TSC

TypeScript
반응형

Visual Studio Code Powershell Command mode = Ctrl + ~

1 ) npm i -g typescript

2 ) index.ts 파일 만들고, console.log('hello world'); 시작

2 ) tsc index.ts ( 보안 오류시, 시작메뉴에서 powershell 관리자 모드 > Set-ExecutionPolicy Unrestricted )

 

반응형