<aside> 💡 이 빠른 시작 가이드에서는 IDLive Doc REST API 사용법만 다룹니다.

</aside>

IDLive Doc 제품을 시작하는 가장 빠르고 쉬운 방법은 Docker 이미지로 제공되는 IDLive Doc Server를 사용하는 것입니다. REST API를 공개하며 최소한의 구성으로 즉시 사용할 수 있습니다.

IDLive Doc Server 에서는 설치, 실행 및 기본 요청의 전체 프로세스를 안내합니다.

필수 구성 요소 설치

IDLive Doc Server는 Docker 이미지 형태로 배포되기 때문에, 컴퓨터에 Docker Engine이 설치되어 있는지 확인해야 합니다. 그렇지 않은 경우 설치하는 가장 좋은 방법은 Docker의 공식 문서를 따르는 것입니다.

다음 단계는 AWS 명령줄 인터페이스(CLI) 유틸리티를 설치하는 것입니다. Docker 이미지 배포를 위해 ID R&D에서 사용하는 Amazon Elastic Container Registry(ECR)에서 Docker 이미지를 가져와야 합니다. AWS CLI를 설치하는 가장 쉬운 방법은 공식 설명서를 따르는 것입니다.

Docker 이미지 가져오기

이제 모든 필수 구성 요소가 설치되었으므로 AROGS에서 제공한 자격을 사용하여 AWS ECR에서 IDLive Doc Server Docker 이미지를 가져올 수 있습니다.

이 가이드에서는 CPU 전용 배포를 위한 EVAL 버전의 이미지를 사용하지만 IDLive Doc Server의 PROD 및/또는 GPU 지원 Docker 이미지에 대한 프로세스는 기본적으로 동일합니다.

아래 예는 Shell을 사용하여 Docker 이미지를 가져오는 프로세스를 보여줍니다.

$ aws configure --profile idrnd
AWS Access Key ID None: <YOUR_API_KEY>
AWS Secret Access Key None: <YOUR_SECRET_API_KEY>
Default region name None: eu-central-1
Default output format None: <None>
$ aws ecr get-login-password --profile idrnd | \
		docker login --username AWS --password-stdin 367672406076.dkr.ecr.eu-central-1.amazonaws.com
$ docker pull 367672406076.dkr.ecr.eu-central-1.amazonaws.com/idlivedoc-server-eval:2.2.0

Docker 컨테이너 실행

Docker 이미지를 가져오면 Docker 컨테이너를 실행할 준비가 된 것입니다. 아래 예에서는 포그라운드(-it 명령)에서 컨테이너를 실행하고 8080 포트(-p 8080:8080 명령)에서 REST API를 노출하는 방법을 보여줍니다.

$ docker run -it -p 8080:8080 367672406076.dkr.ecr.eu-central-1.amazonaws.com/idlivedoc-server-eval:2.2.0
Started License Manager
License /app/eval-all-license-2023-10-23.adminmode.v2c installed

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v3.0.7)

2023-07-20T18:55:54.008Z  INFO 1 --- [           main] net.idrnd.idlivedoc.Application          : Starting Application v2.2.0 using Java 17.0.7 with PID 1 (/app/app.jar started by user in /app)
2023-07-20T18:55:54.010Z  INFO 1 --- [           main] net.idrnd.idlivedoc.Application          : No active profile set, falling back to 1 default profile: "default"
2023-07-20T18:55:55.037Z  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2023-07-20T18:55:55.045Z  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-07-20T18:55:55.045Z  INFO 1 --- [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.8]
2023-07-20T18:55:55.087Z  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-07-20T18:55:55.088Z  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1028 ms
OpenJDK 64-Bit Server VM warning: You have loaded library /app/libs/libDocSdk.so.2.2.0 which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
2023-07-20T18:55:55.470Z  INFO 1 --- [           main] n.i.idlivedoc.service.LivenessService    : Available license features (pipelines that can be enabled):
2023-07-20T18:55:55.470Z  INFO 1 --- [           main] n.i.idlivedoc.service.LivenessService    : DocSdkFeature{ attackType=SCREEN_REPLAY, pipelineName=ibis-sr, expirationDate=2023-10-23}
2023-07-20T18:55:55.470Z  INFO 1 --- [           main] n.i.idlivedoc.service.LivenessService    : DocSdkFeature{ attackType=SCREEN_REPLAY, pipelineName=ibis-sr-soft, expirationDate=2023-10-23}
2023-07-20T18:55:55.470Z  INFO 1 --- [           main] n.i.idlivedoc.service.LivenessService    : DocSdkFeature{ attackType=PRINTED_COPY, pipelineName=nighthawk-pc, expirationDate=2023-10-23}
2023-07-20T18:55:55.470Z  INFO 1 --- [           main] n.i.idlivedoc.service.LivenessService    : DocSdkFeature{ attackType=PRINTED_COPY, pipelineName=jay-pc, expirationDate=2023-10-23}
2023-07-20T18:55:55.470Z  INFO 1 --- [           main] n.i.idlivedoc.service.LivenessService    : DocSdkFeature{ attackType=PRINTED_COPY, pipelineName=kiwi-rc7-pc, expirationDate=2023-10-23}
2023-07-20T18:55:55.470Z  INFO 1 --- [           main] n.i.idlivedoc.service.LivenessService    : DocSdkFeature{ attackType=PRINTED_COPY, pipelineName=kiwi-rc72-pc, expirationDate=2023-10-23}
2023-07-20T18:55:55.470Z  INFO 1 --- [           main] n.i.idlivedoc.service.LivenessService    : DocSdkFeature{ attackType=PORTRAIT_SUBSTITUTION, pipelineName=oriole-ps, expirationDate=2023-10-23}
2023-07-20T18:55:55.470Z  INFO 1 --- [           main] n.i.idlivedoc.service.LivenessService    : DocSdkFeature{ attackType=PORTRAIT_SUBSTITUTION, pipelineName=lark-ps, expirationDate=2023-10-23}
2023-07-20T18:55:55.470Z  INFO 1 --- [           main] n.i.idlivedoc.service.LivenessService    : DocSdkFeature{ attackType=DIGITAL_MANIPULATIONS, pipelineName=hawk-sd, expirationDate=2023-10-23}
2023-07-20T18:55:55.470Z  INFO 1 --- [           main] n.i.idlivedoc.service.LivenessService    : Enabled pipelines:
2023-07-20T18:55:55.470Z  INFO 1 --- [           main] n.i.idlivedoc.service.LivenessService    : default-sr (alias for 'ibis-sr')
2023-07-20T18:55:55.471Z  INFO 1 --- [           main] n.i.idlivedoc.service.LivenessService    : ibis-sr
2023-07-20T18:55:55.471Z  INFO 1 --- [           main] n.i.idlivedoc.service.LivenessService    : Please wait, pipelines initialization may take a while...
2023-07-20T18:55:58.567Z  INFO 1 --- [           main] n.i.idlivedoc.service.LivenessService    : LivenessPipeline ibis-sr.json initialized
2023-07-20T18:55:59.247Z  INFO 1 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 1 endpoint(s) beneath base path ''
2023-07-20T18:55:59.302Z  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2023-07-20T18:55:59.323Z  INFO 1 --- [           main] net.idrnd.idlivedoc.Application          : Started Application in 5.662 seconds (process running for 6.091)

"Started Application ..." 줄이 보이면 컨테이너가 시작되고 요청을 처리할 준비가 된 것입니다.