Shazaaly
docker and run.sh
ea7ba48
raw
history blame
444 Bytes
#!/bin/bash
# Set the Hugging Face home directory to the persistent /data folder
export HF_HOME=/data
# Create the directory that the transformers library will try to use.
# The -p flag ensures it doesn't fail if the directory already exists.
mkdir -p $HF_HOME/hub
# Now, start the FastAPI application
# Using exec means this script will be replaced by the uvicorn process, which is efficient.
exec uvicorn app:app --host 0.0.0.0 --port 7860