Spaces:
Configuration error
Configuration error
File size: 1,295 Bytes
545336c |
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
apiVersion: v1
# To disable the application change enabled: false
enabled: true
# The name of your project
name: my-fastapi-hf-app
# You should replace this with a Docker image you build
image: paperspace/fastapi-hf-template-app:2023-06-20
# Using integrations to bring in external resource
# (e.g. Hugging Face model, S3 bucket)
integrations:
- type: git-lfs # git-lfs used for Hugging Face models
name: opus-mt-en-es
url: https://huggingface.co/Helsinki-NLP/opus-mt-en-es # English to Spanish translation model
path: /opt/integrations/opus-mt-en-es
# Deploy safely by using health checks, preventing traffic from being
# routed to unhealthy instances
healthChecks:
startup:
path: /
port: 8000
readiness:
path: /
port: 8000
liveness:
path: /
port: 8000
# The resources section defines the compute resources used by your service.
# You can specify a number of replicas, an instance type, and autoscaling
# settings here
resources:
replicas: 1
machineType: C5
# The ports the service is running on inside the above image
ports: [8000]
autoscaling:
enabled: true
maxReplicas: 2
metrics:
- metric: requestDuration
summary: average
value: 1.2
- metric: cpu
summary: average
value: 75
|