diff --git a/.gitignore b/.gitignore index c235fc143f..73395face3 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ target/ cycle_gan/python tacotron_melgan/python voice_converter_sidecar/cycle_gan/python + +# Secrets +secrets.yaml diff --git a/deployment.yaml b/deployment.yaml index 62575309d2..9d88378cae 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -22,8 +22,7 @@ metadata: labels: app: tts spec: - # NB: DigitalOcean PersistentVolumes can only be attached to one droplet at a time!? WTF! - replicas: 1 + replicas: 2 selector: matchLabels: app: tts @@ -35,27 +34,65 @@ spec: imagePullSecrets: - name: regcred volumes: - - name: model-pv - persistentVolumeClaim: - claimName: model-pvc + - name: devfuse + hostPath: + path: /dev/fuse + - name: mntdatas3fs + # NB: Doesn't set an explicit hostpath because: + # error while creating mount source path '...': mkdir ...: file exists + emptyDir: {} containers: + - name: s3fs + securityContext: + privileged: true + allowPrivilegeEscalation: true + # TODO: Find a pinned tag for this. `latest` is dangerous + image: panubo/s3fs:latest + #command: ["sleep"] + #args: ["30000"] + volumeMounts: + - name: devfuse + mountPath: /dev/fuse + - name: mntdatas3fs + mountPath: /data:shared + env: + - name: AWS_S3_URL + value: "https://nyc3.digitaloceanspaces.com" + - name: AWS_STORAGE_BUCKET_NAME + value: "upload-datas" + - name: AWS_ACCESS_KEY_ID + valueFrom: + secretKeyRef: + name: spaces-secrets + key: aws_access_key_id + - name: AWS_SECRET_ACCESS_KEY + valueFrom: + secretKeyRef: + name: spaces-secrets + key: aws_secret_access_key + - name: AWS_S3_MOUNTPOINT + value: "/data" + - name: DEBUG + value: "true" - name: tts # NB: Container builds are triggered by Github Actions image: docker.pkg.github.com/echelon/voder/tts-service:374e1a477d90 + volumeMounts: + - name: mntdatas3fs + mountPath: /data:shared env: - name: BIND_ADDRESS value: "0.0.0.0:12345" - name: TACOTRON_MODEL - value: "/store/models/tacotron2-nvidia/tacotron_container.pt" + value: "/data/models/tacotron2-nvidia/tacotron_container.pt" - name: MELGAN_MODEL - value: "/store/models/melgan-swpark/shared_melgan_container.pt" + value: "/data/models/melgan-swpark/shared_melgan_container.pt" command: ["/tts_service"] + #command: ["sleep"] + #args: ["30000"] ports: - containerPort: 12345 protocol: TCP - volumeMounts: - - mountPath: "/store" - name: model-pv readinessProbe: httpGet: path: /readiness