SlideShare a Scribd company logo
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
...
// 여기쯤에 인퍼런스 엔진(1)을 메모리에 올리고
...
// 웹서버를 하나 띄워서 (1)을 돌리자
httpd = SocketServer.TCPServer(
(“”, Port), handler)
httpd.serve_forever()
...
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
•
•
•
•
•
•
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
# Install hdfscli for downloading model files.
RUN pip install hdfs
COPY files/.hdfscli.cfg /root/
…
RUN mkdir -p /naver/BASE-TFS/model
…
# Starting TFS.
COPY docker-entrypoint.sh /
RUN chmod 755 /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
APP_NAME=“aisp-app”
USERNAME=“deview”
MODEL_PATH=“/user/…”
AISP_TFS_MODEL_NAME=“sample_model”
AISP_TFS_OPTIONS=“—enable_batching=true
HOSTPORT=8080
•
•
# Install hdfscli for downloading model files.
RUN pip install hdfs
COPY files/.hdfscli.cfg /root/
…
RUN mkdir -p /naver/BASE-TFS/model
…
# Starting TFS.
COPY docker-entrypoint.sh /
RUN chmod 755 /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
# Upgrade c++ library.
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:ubuntu-toolchain-r/test –y
RUN apt-get updateRUN apt-get upgrade -y libstdc++6
# Run following command if required version not installed
# strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
aisp/tfs-cpu 0.3 9370b0496efb 3 months ago 754.8 MB
docker.io/ubuntu 16.04 0458a4468cbc 7 months ago 111.7 MB
$ ./start_tfs_container.sh cpu # 안에 모델, 포트 등을 정의해놓음.
Docker running deview-tfs TFS container(CPU) ...
ad32740677d0203578f4eef8e3be132f3e73206659d9b30617e04519d77ff62d
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ad32740677d0 aisp/tfs-cpu:0.3 "/docker-entrypoint.s" 8 seconds ago Up 7 seconds 0.0.0.0:13377->80/tcp deview-tfs
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
auto length = tensor.dim_size(1); // Assuming 2D tensor with dim_size(0) = 1
auto data = reinterpret_cast<const float*>(tensor.tensor_data().data());
// 이제 data[i]로 접근
•
•
•
•
•
•
•
X
O
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
•
•
•
•
•
•
•
•
•
•
•
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
$ docker images # 1. 이미지 준비
REPOSITORY TAG IMAGE ID CREATED SIZE
aisp/aps 0.7 d1874e8f5559 3 months ago 1.623 GB
aisp/tfs-cpu 0.3 9370b0496efb 3 months ago 754.8 MB
$ cat start_tfs.sh # 2. 스크립트 설정
APP_NAME="deview-tfs"
HDFS_MODEL_PATH="/user/deview/session/model/20180920/05"
AISP_TFS_MODEL_NAME="samplemodel"
AISP_TFS_OPTIONS="--enable_batching=true"
HOSTPORT=13377
...
$ ./start_tfs.sh # 3. 실행
...
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e0ab6257c977 aisp/tfs-cpu:0.3 "/docker-entrypoint.s" 3 months ago Up 3 months 0.0.0.0:13377->80/tcp ncmp-tfs
# (dev container)
# ls
LinguistClient.cpp Makefile PredictionHelper.hpp RedisClient.hpp TfsClient.hpp deview_aps.cpp
deview_client.cpp utf8.h
LinguistClient.hpp PredictionHelper.cpp RedisClient.cpp TfsClient.cpp initRedis.cpp utf8
# make client
# ./deview_client 원피스
Request inference ...
output1
0.000169681 5.64217e-06 1.49844e-06 0.000512549 0.000931895 1.06733e-05 1.73642e-05 0.000400749 0.997623
0.00032458 2.61629e-06
output2
6.86965e-09 9.56301 ...
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
•
•
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
•
•
•
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
•
•
•
•
•
•
•
•
•
•
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기
[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기

More Related Content

PDF
Introductory to MND-AF
PDF
추천시스템 이제는 돈이 되어야 한다.
PDF
인공지능추천시스템 airs개발기_모델링과시스템
PDF
마이크로서비스 기반 클라우드 아키텍처 구성 모범 사례 - 윤석찬 (AWS 테크에반젤리스트)
PPTX
elasticsearch_적용 및 활용_정리
PDF
2023년 인공지능 서비스 트렌드
PDF
Causal Inference : Primer (2019-06-01 잔디콘)
PDF
우아한 모노리스
Introductory to MND-AF
추천시스템 이제는 돈이 되어야 한다.
인공지능추천시스템 airs개발기_모델링과시스템
마이크로서비스 기반 클라우드 아키텍처 구성 모범 사례 - 윤석찬 (AWS 테크에반젤리스트)
elasticsearch_적용 및 활용_정리
2023년 인공지능 서비스 트렌드
Causal Inference : Primer (2019-06-01 잔디콘)
우아한 모노리스

What's hot (20)

PDF
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
PPTX
[211] HBase 기반 검색 데이터 저장소 (공개용)
PDF
파이썬 생존 안내서 (자막)
PDF
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
PDF
Amazon Redshift 아키텍처 및 모범사례::김민성::AWS Summit Seoul 2018
PPTX
검색엔진이 데이터를 다루는 법 김종민
PDF
ksqlDB로 시작하는 스트림 프로세싱
PDF
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유
PDF
Aws glue를 통한 손쉬운 데이터 전처리 작업하기
PDF
Kubernetes (k8s).pdf
PDF
[215]네이버콘텐츠통계서비스소개 김기영
PDF
PDF
AWS Lambda를 통한 Tensorflow 및 Keras 기반 추론 모델 서비스하기 :: 이준범 :: AWS Summit Seoul 2018
PDF
Random Thoughts on Paper Implementations [KAIST 2018]
PDF
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
PDF
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
PDF
카프카(kafka) 성능 테스트 환경 구축 (JMeter, ELK)
PPTX
AWS compute Services
PDF
The Patterns of Distributed Logging and Containers
PDF
NiFi 시작하기
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
[211] HBase 기반 검색 데이터 저장소 (공개용)
파이썬 생존 안내서 (자막)
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
Amazon Redshift 아키텍처 및 모범사례::김민성::AWS Summit Seoul 2018
검색엔진이 데이터를 다루는 법 김종민
ksqlDB로 시작하는 스트림 프로세싱
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유
Aws glue를 통한 손쉬운 데이터 전처리 작업하기
Kubernetes (k8s).pdf
[215]네이버콘텐츠통계서비스소개 김기영
AWS Lambda를 통한 Tensorflow 및 Keras 기반 추론 모델 서비스하기 :: 이준범 :: AWS Summit Seoul 2018
Random Thoughts on Paper Implementations [KAIST 2018]
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
카프카(kafka) 성능 테스트 환경 구축 (JMeter, ELK)
AWS compute Services
The Patterns of Distributed Logging and Containers
NiFi 시작하기
Ad

Similar to [214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기 (20)

PDF
php & performance
PPT
Securing Your Webserver By Pradeep Sharma
PDF
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
PPTX
Virtualization and automation of library software/machines + Puppet
PDF
Docker, c'est bonheur !
PDF
PHP & Performance
PDF
02 Hadoop deployment and configuration
PDF
2 docker engine_hands_on
 
PDF
Puppet: Eclipsecon ALM 2013
PDF
Hadoop meet Rex(How to construct hadoop cluster with rex)
PDF
Write php deploy everywhere tek11
PDF
How to create your own hack environment
PDF
Developing and Deploying PHP with Docker
PDF
EC2 AMI Factory with Chef, Berkshelf, and Packer
PDF
infra-as-code
PDF
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
PPTX
Docker Security workshop slides
PDF
dockerizing web application
PDF
Ansible is the simplest way to automate. SymfonyCafe, 2015
PDF
Dependencies Managers in C/C++. Using stdcpp 2014
php & performance
Securing Your Webserver By Pradeep Sharma
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
Virtualization and automation of library software/machines + Puppet
Docker, c'est bonheur !
PHP & Performance
02 Hadoop deployment and configuration
2 docker engine_hands_on
 
Puppet: Eclipsecon ALM 2013
Hadoop meet Rex(How to construct hadoop cluster with rex)
Write php deploy everywhere tek11
How to create your own hack environment
Developing and Deploying PHP with Docker
EC2 AMI Factory with Chef, Berkshelf, and Packer
infra-as-code
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Docker Security workshop slides
dockerizing web application
Ansible is the simplest way to automate. SymfonyCafe, 2015
Dependencies Managers in C/C++. Using stdcpp 2014
Ad

More from NAVER D2 (20)

PDF
[211] 인공지능이 인공지능 챗봇을 만든다
PDF
[233] 대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing: Maglev Hashing Scheduler i...
PDF
[215] Druid로 쉽고 빠르게 데이터 분석하기
PDF
[245]Papago Internals: 모델분석과 응용기술 개발
PDF
[236] 스트림 저장소 최적화 이야기: 아파치 드루이드로부터 얻은 교훈
PDF
[235]Wikipedia-scale Q&A
PDF
[244]로봇이 현실 세계에 대해 학습하도록 만들기
PDF
[243] Deep Learning to help student’s Deep Learning
PDF
[234]Fast & Accurate Data Annotation Pipeline for AI applications
PDF
Old version: [233]대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing
PDF
[226]NAVER 광고 deep click prediction: 모델링부터 서빙까지
PDF
[225]NSML: 머신러닝 플랫폼 서비스하기 & 모델 튜닝 자동화하기
PDF
[224]네이버 검색과 개인화
PDF
[216]Search Reliability Engineering (부제: 지진에도 흔들리지 않는 네이버 검색시스템)
PDF
[213] Fashion Visual Search
PDF
[232] TensorRT를 활용한 딥러닝 Inference 최적화
PDF
[242]컴퓨터 비전을 이용한 실내 지도 자동 업데이트 방법: 딥러닝을 통한 POI 변화 탐지
PDF
[212]C3, 데이터 처리에서 서빙까지 가능한 하둡 클러스터
PDF
[223]기계독해 QA: 검색인가, NLP인가?
PDF
[231] Clova 화자인식
[211] 인공지능이 인공지능 챗봇을 만든다
[233] 대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing: Maglev Hashing Scheduler i...
[215] Druid로 쉽고 빠르게 데이터 분석하기
[245]Papago Internals: 모델분석과 응용기술 개발
[236] 스트림 저장소 최적화 이야기: 아파치 드루이드로부터 얻은 교훈
[235]Wikipedia-scale Q&A
[244]로봇이 현실 세계에 대해 학습하도록 만들기
[243] Deep Learning to help student’s Deep Learning
[234]Fast & Accurate Data Annotation Pipeline for AI applications
Old version: [233]대형 컨테이너 클러스터에서의 고가용성 Network Load Balancing
[226]NAVER 광고 deep click prediction: 모델링부터 서빙까지
[225]NSML: 머신러닝 플랫폼 서비스하기 & 모델 튜닝 자동화하기
[224]네이버 검색과 개인화
[216]Search Reliability Engineering (부제: 지진에도 흔들리지 않는 네이버 검색시스템)
[213] Fashion Visual Search
[232] TensorRT를 활용한 딥러닝 Inference 최적화
[242]컴퓨터 비전을 이용한 실내 지도 자동 업데이트 방법: 딥러닝을 통한 POI 변화 탐지
[212]C3, 데이터 처리에서 서빙까지 가능한 하둡 클러스터
[223]기계독해 QA: 검색인가, NLP인가?
[231] Clova 화자인식

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
cuic standard and advanced reporting.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Empathic Computing: Creating Shared Understanding
PDF
KodekX | Application Modernization Development
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Advanced IT Governance
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Electronic commerce courselecture one. Pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
cuic standard and advanced reporting.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Approach and Philosophy of On baking technology
Chapter 3 Spatial Domain Image Processing.pdf
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Empathic Computing: Creating Shared Understanding
KodekX | Application Modernization Development
Review of recent advances in non-invasive hemoglobin estimation
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
Advanced IT Governance
Advanced methodologies resolving dimensionality complications for autism neur...
Electronic commerce courselecture one. Pdf

[214] Ai Serving Platform: 하루 수 억 건의 인퍼런스를 처리하기 위한 고군분투기

  • 5. ... // 여기쯤에 인퍼런스 엔진(1)을 메모리에 올리고 ... // 웹서버를 하나 띄워서 (1)을 돌리자 httpd = SocketServer.TCPServer( (“”, Port), handler) httpd.serve_forever() ...
  • 12. # Install hdfscli for downloading model files. RUN pip install hdfs COPY files/.hdfscli.cfg /root/ … RUN mkdir -p /naver/BASE-TFS/model … # Starting TFS. COPY docker-entrypoint.sh / RUN chmod 755 /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] APP_NAME=“aisp-app” USERNAME=“deview” MODEL_PATH=“/user/…” AISP_TFS_MODEL_NAME=“sample_model” AISP_TFS_OPTIONS=“—enable_batching=true HOSTPORT=8080
  • 13. • • # Install hdfscli for downloading model files. RUN pip install hdfs COPY files/.hdfscli.cfg /root/ … RUN mkdir -p /naver/BASE-TFS/model … # Starting TFS. COPY docker-entrypoint.sh / RUN chmod 755 /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] # Upgrade c++ library. RUN apt-get install -y software-properties-common RUN add-apt-repository ppa:ubuntu-toolchain-r/test –y RUN apt-get updateRUN apt-get upgrade -y libstdc++6 # Run following command if required version not installed # strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
  • 14. $ docker images REPOSITORY TAG IMAGE ID CREATED SIZE aisp/tfs-cpu 0.3 9370b0496efb 3 months ago 754.8 MB docker.io/ubuntu 16.04 0458a4468cbc 7 months ago 111.7 MB $ ./start_tfs_container.sh cpu # 안에 모델, 포트 등을 정의해놓음. Docker running deview-tfs TFS container(CPU) ... ad32740677d0203578f4eef8e3be132f3e73206659d9b30617e04519d77ff62d $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ad32740677d0 aisp/tfs-cpu:0.3 "/docker-entrypoint.s" 8 seconds ago Up 7 seconds 0.0.0.0:13377->80/tcp deview-tfs
  • 21. • • • • auto length = tensor.dim_size(1); // Assuming 2D tensor with dim_size(0) = 1 auto data = reinterpret_cast<const float*>(tensor.tensor_data().data()); // 이제 data[i]로 접근
  • 29. $ docker images # 1. 이미지 준비 REPOSITORY TAG IMAGE ID CREATED SIZE aisp/aps 0.7 d1874e8f5559 3 months ago 1.623 GB aisp/tfs-cpu 0.3 9370b0496efb 3 months ago 754.8 MB $ cat start_tfs.sh # 2. 스크립트 설정 APP_NAME="deview-tfs" HDFS_MODEL_PATH="/user/deview/session/model/20180920/05" AISP_TFS_MODEL_NAME="samplemodel" AISP_TFS_OPTIONS="--enable_batching=true" HOSTPORT=13377 ... $ ./start_tfs.sh # 3. 실행 ... $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES e0ab6257c977 aisp/tfs-cpu:0.3 "/docker-entrypoint.s" 3 months ago Up 3 months 0.0.0.0:13377->80/tcp ncmp-tfs
  • 30. # (dev container) # ls LinguistClient.cpp Makefile PredictionHelper.hpp RedisClient.hpp TfsClient.hpp deview_aps.cpp deview_client.cpp utf8.h LinguistClient.hpp PredictionHelper.cpp RedisClient.cpp TfsClient.cpp initRedis.cpp utf8 # make client # ./deview_client 원피스 Request inference ... output1 0.000169681 5.64217e-06 1.49844e-06 0.000512549 0.000931895 1.06733e-05 1.73642e-05 0.000400749 0.997623 0.00032458 2.61629e-06 output2 6.86965e-09 9.56301 ...
  • 39.