Spaces:
Runtime error
Runtime error
File size: 571 Bytes
276b8cf 62009ed 276b8cf 62009ed 276b8cf 62009ed 276b8cf 62009ed 276b8cf 62009ed |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# Ensure Docker Buildx is used and setup docker buildx create --use #export your API token as a secret variable export HF_API_TOKEN="your_huggingface_api_token_here" echo $HF_API_TOKEN # Build your Docker image with Buildx (assuming you're now working locally and not pushing to a registry) docker buildx build --load --secret id=HF_API_TOKEN,env=HF_API_TOKEN -t gradio-app . # Now run your Docker container, passing the secret environment variable docker run -it -p 7860:7860 -e HF_API_TOKEN=$HF_API_TOKEN gradio-app # Use docker composer docker-compose up --build |