본문 바로가기

Big Data29

tensorflow serving memory leak?? 아래의 docker hub를 통해 tensorflow serving 이미지를 다운 받는다. https://hub.docker.com/layers/tensorflow/serving/2.14.1-gpu/images/sha256-cdae1c60c07d1ffc94ebc086e0f1a4d7f1ecc52f3fec558f1f7b506dfd4edce2?context=explore Docker hub.docker.com $> docker pull tensorflow/serving:2.14.1-gpu model은 dockerhub git에 있는 예제 프로그램 대로 실행해본다. 1. 우선은 git 받기 $> git clone https://github.com/tensorflow/serving 2. 환경 변수 정의하기 $> .. 2024. 4. 2.
pod evicted 난 pod 일괄 삭제하기 evicted가 된 pod의 경우 계속 pod에 남아 있어서 k8s 화면에 빨간색으로 떠 있게 된다.. (이게 너무 싫음) 그래서 evicted된 pod를 모두 일괄 삭제하기로 했다. 우선 evicted된 원인 확인을 위해 evicted 된 pod의 describe를 log에 저장한다. kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl describe pods {} > evicted.log 해당 log 저장이 완료되었으면 이제 해당 pod들을 삭제해주자. k get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pods {} 2024. 2. 6.
rdd mapPartitions와 foreachPartition 비교 쓰면서 늘 헷갈리는게 foreachPartition인 것 같다. 이게 무슨 용도로 있는 함수인가... 그래서 이번 기회에 mapPartitions와 foreachPartition을 비교해 보기로 했다. 아래와 같이 코드를 작성한다. num_rdd = sc.parallelize(range(100000), 10) num_rdd.getNumPartitions() getNumPartitions를 찍어보면 10개가 찍히는 걸 확인할 수 있다. 이제 map으로 돌릴 함수를 선언하자 def square(num_list): for num in num_list: yield num * num mapPartitions의 경우 yield 값을 넘겨주어야 iterate 동작을 할 수가 있다. 이제 이 함수를 mapPartiti.. 2024. 2. 5.
java.lang.IllegalAccessError: class org.apache.spark.storage.StorageUtils$ cannot access class sun.nio.ch.DirectBuffer spark session 생성 시에 아래와 같은 에러가 발생 했다. java.lang.IllegalAccessError: class org.apache.spark.storage.StorageUtils$ (in unnamed module @0x706a04ae) cannot access class sun.nio.ch.DirectBuffer 에러가 발생되는 코드는 아래와 같다. SparkSession.builder().config(sparkConf) .getOrCreate() 평상 시에 늘 쓰던 구문인데 갑자기 에러가 발생해서 당황했다. ㅠ_ㅠ 구글링을 해도 별다른 말을 없고.... intelliJ에서 이리저리 설정을 찾던 도중 아래와 같이 Run configuration이 java 11로 되어 있다는 사실을.. 2024. 1. 8.
pyflink 시작하기 회사 시스템을 flink로 변경해야 하는 이슈가 있어서 겸사겸사 pyflink를 사용해 보기로 했다. 아래는 flink docker file로 안내되어 있는 flink homepage https://nightlies.apache.org/flink/flink-docs-release-1.18/docs/deployment/resource-providers/standalone/docker/#using-flink-python-on-docker Docker Docker Setup # Getting Started # This Getting Started section guides you through the local setup (on one machine, but in separate containers) of a.. 2023. 11. 22.
k8s deployment에 sidecar 적용해보기 대부분의 pod는 1 pod = 1 container가 기본이나 동작 방식이나 응용 방식에 따라서 1pod안에 여러 개의 container를 두는 경우가 있다. 이러한 경우를 sidecar라고 하며 아래의 구조와 같다. 그냥 nginx를 별도 pod로 띄우고 micro service를 하면 되지 않을까?? 라는 생각을 잠시 하였으나, web application의 경우 nginx와 통신하기 위해서는 cross domain 문제도 설정해야 하는 이슈 등이 있기 때문에 일단 간편하게 위와 같은 방식으로 사용했다. sidecar를 설정하기 위해서는 아래와 같이 deployment.yaml을 작성해 주면 된다. apiVersion: apps/v1 kind: Deployment metadata: name: pro.. 2023. 9. 25.
맥에 kubeflow 설치하기 설치 환경 minikube : v1.26.0 kubectl client : v1.21.0 kubectl server : v.1.21.0 kustomize : v.3.2.0 kubenetes : v.1.21.0 kubeflow : v.1.4.0 1. kubenetes를 설치하기 위해 우선 minikube를 설치한다. $> brew install minikube 2. minikube의 설치가 끝났다면 kubectl을 설치하자. $> curl -LO "https://dl.k8s.io/release/v1.21.0/bin/darwin/amd64/kubectl" $> chmod +x ./kubectl $> sudo mv ./kubectl /usr/local/bin/kubectl $> sudo chown root: .. 2022. 7. 26.
[KUBEFLOW] 2. Getting started https://www.manning.com/books/kubeflow-in-action Kubeflow in Action Kubeflow simplifies and automates machine learning tasks like interactive analysis, complex pipelines, and model training. Seamlessly push models to production in the containerized and distributed environment and scale your ML infrastructure from your lapt www.manning.com 이 장에서는 kubeflow 설치 방법과 Jupyter Notebooks, Minio, Seldon과 .. 2022. 2. 14.
[KUBEFLOW] 1. Data science at scale https://www.manning.com/books/kubeflow-in-action Kubeflow in Action Kubeflow simplifies and automates machine learning tasks like interactive analysis, complex pipelines, and model training. Seamlessly push models to production in the containerized and distributed environment and scale your ML infrastructure from your lapt www.manning.com kubeflow는 데이터 사전 처리에서 모델 학습, 배포까지의 모든 기능을 제공하는 프레임워크이다. 1.. 2022. 2. 12.