티스토리 뷰
아래의 doc을 참고하여 우선 GPU 서버가 없으므로 CPU에 작은 모델을 서빙 해보려고 한다.
https://github.com/triton-inference-server/server
GitHub - triton-inference-server/server: The Triton Inference Server provides an optimized cloud and edge inferencing solution.
The Triton Inference Server provides an optimized cloud and edge inferencing solution. - GitHub - triton-inference-server/server: The Triton Inference Server provides an optimized cloud and edge i...
github.com
먼저 git clone을 받고 model_repository를 세팅한다.
$ cd docs/examples
$ ./fetch_models.sh
먼저 아래의 명령어를 사용하여 triton 도커 서버를 올려보자.
docker run --rm -p8000:8000 -p8001:8001 -p8002:8002 -v/full/path/to/docs/examples/model_repository:/models nvcr.io/nvidia/tritonserver:24.03-py3 tritonserver --model-repository=/models
참고로 GPU는 아래의 명령어를 사용하자.
docker run --gpus=1 --rm -p8000:8000 -p8001:8001 -p8002:8002 -v/full/path/to/docs/examples/model_repository:/models nvcr.io/nvidia/tritonserver:<xx.yy>-py3 tritonserver --model-repository=/models
오래걸린다...
도커가 실행되면 어떤 모델이 있는지 상태가 어떤지 확인할 수 있다.
잘 올라왔는지 curl로 확인해보면 200 OK 성공!
그럼 Inference 요청을 해보자. 일단 하기 전에 또 무언가 작업을 해야한다. 클라이언트 이미지를 받아 실행해야한다.
docker pull nvcr.io/nvidia/tritonserver:<xx.yy>-py3-sdk
이제 컨테이너를 실행하고 내부에 들어가자 !
docker run -it --rm --net=host nvcr.io/nvidia/tritonserver:<xx.yy>-py3-sdk
내부에서 실행하면 이와 같이 서버에 콜을 보낼 수가 있다. 자세히 어떻게 보내는지는 실제 내 모델을 올려보며 테스트 해봐야겠다.
root@docker-desktop:/workspace/images# /workspace/install/bin/image_client -m densenet_onnx -c 3 -s INCEPTION /workspace/images/mug.jpg
Request 0, batch size 1
Image '/workspace/images/mug.jpg':
15.349564 (504) = COFFEE MUG
13.227464 (968) = CUP
10.424892 (505) = COFFEEPOT
- Total
- Today
- Yesterday
- Ai
- 그리디
- java
- linux
- 프로그래머스
- 시간초과
- 딥러닝
- lightsail
- 분산시스템
- 자료구조
- 보안기사
- LangChain
- 다이나믹프로그래밍
- synflooding
- 리눅스
- Python
- huggingface
- 파이썬
- 정보보안
- 카카오페이면접후기
- llm
- 우선순위큐
- 백준
- FastAPI
- 카카오페이
- 코딩테스트
- 정보보안기사
- t-test
- 보안
- springboot
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |