diff --git a/health-and-lifecycle/README.md b/health-and-lifecycle/README.md index f77c853..dca90a3 100644 --- a/health-and-lifecycle/README.md +++ b/health-and-lifecycle/README.md @@ -6,4 +6,4 @@ This example container demonstrates several lifecycle-management aspects: * health-check endpoint that is aware of requests being served * `SIGTERM` handling for graceful shutdown. -Please see [this documentation article](https://docs.datacrunch.io/containers/scaling) for additional discussion. \ No newline at end of file +Please see [this documentation article](https://docs.verda.com/containers/scaling) for additional discussion. \ No newline at end of file diff --git a/health-and-lifecycle/requirements.txt b/health-and-lifecycle/requirements.txt index e1676c4..1df8956 100644 --- a/health-and-lifecycle/requirements.txt +++ b/health-and-lifecycle/requirements.txt @@ -9,7 +9,6 @@ logging==0.4.9.6 pydantic==2.11.3 pydantic_core==2.33.1 sniffio==1.3.1 -starlette==0.46.2 typing-inspection==0.4.0 typing_extensions==4.13.2 uvicorn==0.34.2 \ No newline at end of file diff --git a/hello-world/README.md b/hello-world/README.md index 401ce44..b61f190 100644 --- a/hello-world/README.md +++ b/hello-world/README.md @@ -1,6 +1,6 @@ # Hello World! Container -Here is an example of a simple container compatible with DataCrunch serverless containers. +Here is an example of a simple container compatible with Verda serverless containers. Build: @@ -23,7 +23,7 @@ Depending on whether you have a GPU available this will give you the following {"message":"Hello world, I can run on cpu|gpu!"} ``` -To make the container available to DataCrunch Containers, it needs to be pushed to a Docker registry: +To make the container available to Verda Containers, it needs to be pushed to a Docker registry: ```bash docker push $YOUR_REGISTRY/hello-world:v1 ``` diff --git a/whisper-async/health-check.sh b/whisper-async/health-check.sh index 8e345df..a29ac7f 100755 --- a/whisper-async/health-check.sh +++ b/whisper-async/health-check.sh @@ -1,12 +1,12 @@ #!/bin/bash -if [ -z "$DATACRUNCH_DEPLOYMENT" ] || [ -z "$DATACRUNCH_BEARER_TOKEN" ]; then - echo "Error: DATACRUNCH_DEPLOYMENT and DATACRUNCH_BEARER_TOKEN environment variables must be set" +if [ -z "$VERDA_DEPLOYMENT" ] || [ -z "$VERDA_BEARER_TOKEN" ]; then + echo "Error: VERDA_DEPLOYMENT and VERDA_BEARER_TOKEN environment variables must be set" exit 1 fi -ENDPOINT=https://containers.datacrunch.io/$DATACRUNCH_DEPLOYMENT/health +ENDPOINT=https://containers.datacrunch.io/$VERDA_DEPLOYMENT/health echo "Connecting to health-check endpoint at $ENDPOINT..." curl -X GET $ENDPOINT \ ---header "Authorization: Bearer $DATACRUNCH_BEARER_TOKEN" \ +--header "Authorization: Bearer $VERDA_BEARER_TOKEN" \ --header "Content-Type: application/json" \ No newline at end of file diff --git a/whisper-async/inference-webhook.sh b/whisper-async/inference-webhook.sh index afcc88e..261fd52 100755 --- a/whisper-async/inference-webhook.sh +++ b/whisper-async/inference-webhook.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [ -z "$DATACRUNCH_DEPLOYMENT" ] || [ -z "$DATACRUNCH_BEARER_TOKEN" ]; then - echo "Error: DATACRUNCH_DEPLOYMENT and DATACRUNCH_BEARER_TOKEN environment variables must be set" +if [ -z "$VERDA_DEPLOYMENT" ] || [ -z "$VERDA_BEARER_TOKEN" ]; then + echo "Error: VERDA_DEPLOYMENT and VERDA_BEARER_TOKEN environment variables must be set" exit 1 fi @@ -8,11 +8,11 @@ PAYLOAD='{ "url": "https://tile.loc.gov/storage-services/media/ls/sagan/1958124-3-1.mp3" }' -ENDPOINT=https://containers.datacrunch.io/$DATACRUNCH_DEPLOYMENT/generate_webhook +ENDPOINT=https://containers.datacrunch.io/$VERDA_DEPLOYMENT/generate_webhook echo "Connecting to the generate_webhook endpoint at $ENDPOINT..." curl -v -X POST $ENDPOINT \ ---header "Authorization: Bearer $DATACRUNCH_BEARER_TOKEN" \ +--header "Authorization: Bearer $VERDA_BEARER_TOKEN" \ --header "Content-Type: application/json" \ --header "Prefer: respond-async-container" \ --data "$PAYLOAD" diff --git a/whisper-async/inference.py b/whisper-async/inference.py index 751c34e..b3245ee 100644 --- a/whisper-async/inference.py +++ b/whisper-async/inference.py @@ -4,8 +4,8 @@ import signal def do_test_request() -> None: - token = os.environ['DATACRUNCH_BEARER_TOKEN'] - deployment_name = os.environ['DATACRUNCH_DEPLOYMENT'] + token = os.environ['VERDA_BEARER_TOKEN'] + deployment_name = os.environ['VERDA_DEPLOYMENT'] baseurl = "https://containers.datacrunch.io" inference_url = f"{baseurl}/{deployment_name}/generate" diff --git a/whisper-async/inference.sh b/whisper-async/inference.sh index 2446a76..5e7948f 100755 --- a/whisper-async/inference.sh +++ b/whisper-async/inference.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [ -z "$DATACRUNCH_DEPLOYMENT" ] || [ -z "$DATACRUNCH_BEARER_TOKEN" ]; then - echo "Error: DATACRUNCH_DEPLOYMENT and DATACRUNCH_BEARER_TOKEN environment variables must be set" +if [ -z "$VERDA_DEPLOYMENT" ] || [ -z "$VERDA_BEARER_TOKEN" ]; then + echo "Error: VERDA_DEPLOYMENT and VERDA_BEARER_TOKEN environment variables must be set" exit 1 fi @@ -8,11 +8,11 @@ PAYLOAD='{ "url": "https://tile.loc.gov/storage-services/media/ls/sagan/1958124-3-1.mp3" }' -ENDPOINT="https://containers.datacrunch.io/$DATACRUNCH_DEPLOYMENT/generate" +ENDPOINT="https://containers.datacrunch.io/$VERDA_DEPLOYMENT/generate" echo "Performing async inference at $ENDPOINT" curl -X POST $ENDPOINT \ ---header "Authorization: Bearer $DATACRUNCH_BEARER_TOKEN" \ +--header "Authorization: Bearer $VERDA_BEARER_TOKEN" \ --header "Content-Type: application/json" \ --header "Prefer: respond-async" \ --data "$PAYLOAD" \ No newline at end of file diff --git a/whisper-async/result.py b/whisper-async/result.py index b0404f9..489b1d7 100644 --- a/whisper-async/result.py +++ b/whisper-async/result.py @@ -4,9 +4,9 @@ import signal def get_result() -> None: - token = os.environ['DATACRUNCH_BEARER_TOKEN'] - deployment_name = os.environ['DATACRUNCH_DEPLOYMENT'] - async_task_id = os.environ['DATACRUNCH_TASK_ID'] + token = os.environ['VERDA_BEARER_TOKEN'] + deployment_name = os.environ['VERDA_DEPLOYMENT'] + async_task_id = os.environ['VERDA_TASK_ID'] baseurl = "https://containers.datacrunch.io" status_url = f"{baseurl}/result/{deployment_name}" diff --git a/whisper-async/status.py b/whisper-async/status.py index 533f9fc..fb01df7 100644 --- a/whisper-async/status.py +++ b/whisper-async/status.py @@ -4,9 +4,9 @@ import signal def get_status() -> None: - token = os.environ['DATACRUNCH_BEARER_TOKEN'] - deployment_name = os.environ['DATACRUNCH_DEPLOYMENT'] - async_task_id = os.environ['DATACRUNCH_TASK_ID'] + token = os.environ['VERDA_BEARER_TOKEN'] + deployment_name = os.environ['VERDA_DEPLOYMENT'] + async_task_id = os.environ['VERDA_TASK_ID'] baseurl = "https://containers.datacrunch.io" result_url = f"{baseurl}/status/{deployment_name}" diff --git a/whisper/Dockerfile b/whisper/Dockerfile index 10cc12f..e4bf026 100644 --- a/whisper/Dockerfile +++ b/whisper/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12 +FROM python:3.14 WORKDIR /app COPY requirements.txt . diff --git a/whisper/README.md b/whisper/README.md index 7bd8829..af8a770 100644 --- a/whisper/README.md +++ b/whisper/README.md @@ -1,11 +1,11 @@ # Whisper Container -Here is an example of fully operational [Whisper-large-v3-turbo](https://huggingface.co/openai/whisper-large-v3-turbo) endpoint containerized for use with DataCrunch containers. +Here is an example of fully operational [Whisper-large-v3-turbo](https://huggingface.co/openai/whisper-large-v3-turbo) endpoint containerized for use with Verda containers. This container implements two endpoints: * `/generate` - a standard Whisper speech-to-text endpoint -* `/health` - health-check on the container used by DataCrunch Containers to make sure the container us running and healthy. +* `/health` - health-check on the container used by Verda Containers to make sure the container us running and healthy. Build: @@ -18,13 +18,13 @@ Push to a Docker registry: docker push $YOUR_REGISTRY/whisper:v1 ``` -When the container starts, it will fetch the model weights from Hugging Face. Therefore, to run the container you will need to supply your [Hugging Face User access token](https://huggingface.co/docs/hub/en/security-tokens) as an environment variable `HF_TOKEN`. This can be easily done via DataCrunch Containers UI. +When the container starts, it will fetch the model weights from Hugging Face. Therefore, to run the container you will need to supply your [Hugging Face User access token](https://huggingface.co/docs/hub/en/security-tokens) as an environment variable `HF_TOKEN`. This can be easily done via Verda Containers UI. -Once the container has been deployed on DataCrunch, and the endpoint is runnning, you can testing by running the following, which will send the `audio.wav` file to the endpoint for transcription: +Once the container has been deployed on Verda, and the endpoint is runnning, you can test it by running the following, which will send the `audio.wav` file to the endpoint for transcription: ```bash -export DATACRUNCH_CONTAINER_URL=https://containers.datacrunch.io//generate -export DATACRUNCH_BEARER_TOKEN=dc_ +export VERDA_CONTAINER_URL=https://containers.datacrunch.io//generate +export VERDA_BEARER_TOKEN=dc_ ./inference.sh ``` diff --git a/whisper/health-check.sh b/whisper/health-check.sh index dfe07e2..a8c6613 100755 --- a/whisper/health-check.sh +++ b/whisper/health-check.sh @@ -1,9 +1,9 @@ #!/bin/bash -if [ -z "$DATACRUNCH_CONTAINER_URL" ] || [ -z "$DATACRUNCH_BEARER_TOKEN" ]; then - echo "Error: DATACRUNCH_CONTAINER_URL and DATACRUNCH_BEARER_TOKEN environment variables must be set" +if [ -z "$VERDA_CONTAINER_URL" ] || [ -z "$VERDA_BEARER_TOKEN" ]; then + echo "Error: VERDA_CONTAINER_URL and VERDA_BEARER_TOKEN environment variables must be set" exit 1 fi -curl -X GET "$DATACRUNCH_CONTAINER_URL/health" \ ---header "Authorization: Bearer $DATACRUNCH_BEARER_TOKEN" \ +curl -X GET "$VERDA_CONTAINER_URL/health" \ +--header "Authorization: Bearer $VERDA_BEARER_TOKEN" \ --header "Content-Type: application/json" diff --git a/whisper/inference.sh b/whisper/inference.sh index 00cd217..da9470d 100755 --- a/whisper/inference.sh +++ b/whisper/inference.sh @@ -1,12 +1,12 @@ #!/bin/bash -if [ -z "$DATACRUNCH_CONTAINER_URL" ] || [ -z "$DATACRUNCH_BEARER_TOKEN" ]; then - echo "Error: DATACRUNCH_CONTAINER_URL and DATACRUNCH_BEARER_TOKEN environment variables must be set" +if [ -z "$VERDA_CONTAINER_URL" ] || [ -z "$VERDA_BEARER_TOKEN" ]; then + echo "Error: VERDA_CONTAINER_URL and VERDA_BEARER_TOKEN environment variables must be set" exit 1 fi -echo "Calling API at $DATACRUNCH_CONTAINER_URL/generate" +echo "Calling API at $VERDA_CONTAINER_URL/generate" curl -X POST \ -F "file=@audio.wav" \ -"$DATACRUNCH_CONTAINER_URL/generate" \ ---header "Authorization: Bearer $DATACRUNCH_BEARER_TOKEN" +"$VERDA_CONTAINER_URL/generate" \ +--header "Authorization: Bearer $VERDA_BEARER_TOKEN" diff --git a/whisper/requirements.txt b/whisper/requirements.txt index 956fd77..10bd286 100644 --- a/whisper/requirements.txt +++ b/whisper/requirements.txt @@ -1,8 +1,8 @@ fastapi==0.115.12 uvicorn==0.34.2 -torch==2.6.0 -torchaudio==2.6.0 -transformers==4.51.3 +torch==2.9.0 +torchaudio==2.9.0 +transformers==4.53.0 soundfile==0.13.1 safetensors==0.5.3 accelerate==1.6.0