--- kind: Service apiVersion: v1 metadata: name: tts namespace: mumble spec: type: LoadBalancer selector: app: tts ports: - name: http protocol: TCP port: 80 targetPort: 12345 --- apiVersion: apps/v1 kind: Deployment metadata: name: tts namespace: mumble labels: app: tts spec: replicas: 4 selector: matchLabels: app: tts template: metadata: labels: app: tts annotations: bump: '2' spec: terminationGracePeriodSeconds: 60 imagePullSecrets: - name: regcred volumes: - name: downloads hostPath: path: /downloads type: DirectoryOrCreate containers: - name: downloader image: docker.pkg.github.com/ml-applications/do-spaces-downloader/do-spaces-downloader:58ec25e3aa3c command: ["./launch.sh"] args: [""] #command: ["sleep"] #args: ["300000"] volumeMounts: - name: downloads mountPath: /data/downloads env: - name: ACCESS_KEY valueFrom: secretKeyRef: name: spaces-secrets key: aws_access_key_id - name: SECRET_KEY valueFrom: secretKeyRef: name: spaces-secrets key: aws_secret_access_key - name: BUCKET_NAME value: "upload-models" - name: REGION value: "nyc3" # NB: These filesystem paths are strage because they need to be on the # same filesystem. Rust can't handle moving files between filesystems yet: # "Error: Invalid cross-device link (os error 18)" - name: DOWNLOAD_DIR value: "/data/downloads/downloaded" - name: TEMP_DIR value: "/data/downloads/tmp" - name: MATCH_PATH value: "" # previously "models/" - name: SLEEP_TIMEOUT value: "300" - name: RUST_LOG value: "info,do_spaces_downloader=debug" - name: tts # NB: Container builds are triggered by Github Actions # The following image runs a non-Arpabet engine that can run an # LSpeech model that sounds 100% amazing # image: docker.pkg.github.com/echelon/voder/tts-service:6b5c22567614 # image: docker.pkg.github.com/ml-applications/voder/tts-service:42f51ecd18e2 resources: limits: # 4 GiB (4096 MiB) # 3 GiB (3072 MiB) # 2 GiB (2048 MiB) memory: "4Gi" # Just under 4 GB cpu: "700m" # 700 milliCPU requests: #memory: "50Mi" - we're getting evicted! # Warning FailedScheduling default-scheduler 0/6 nodes are available: 6 Insufficient memory. # Normal NotTriggerScaleUp 29s cluster-autoscaler pod didn't trigger scale-up (it wouldn't fit if # a new node is added): # memory: "4Gi" # Just under 4 GB cpu: "700m" # 700 milliCPU volumeMounts: - name: downloads mountPath: /data/downloads env: - name: DATABASE_URL valueFrom: secretKeyRef: name: db-secrets key: url - name: BIND_ADDRESS value: "0.0.0.0:12345" - name: NUM_WORKERS value: "5" - name: ASSET_DIRECTORY value: "/data/downloads/downloaded/frontend/build" # TODO - name: MODEL_CONFIG_FILE value: "/data/downloads/downloaded/models/deployed_models.toml" - name: MAX_CHAR_LEN value: "220" command: ["./launch.sh"] args: [""] #command: ["sleep"] #args: ["300000"] ports: - containerPort: 12345 protocol: TCP # If the readiness probe fails, the container is removed from the service. readinessProbe: httpGet: path: /readiness port: 12345 # Check every two seconds. periodSeconds: 2 # Warmup period before first check. initialDelaySeconds: 5 # How long it takes for the probe to time out. timeoutSeconds: 1 # Number of attempts before the pod is marked unready failureThreshold: 1 # If the liveness probe fails, the container is subject to its restart policy # Since the container can crash on its own, we'll omit this. # livenessProbe: # httpGet: # path: /liveness # port: 12345 # initialDelaySeconds: 20 # periodSeconds: 10 # timeoutSeconds: 3 # failureThreshold: 3