Configure Storage Directories#
Configure the Assets Directory#
ASSET_STORAGE_DIR
is the host path used to store uploaded files to. If not specified,
container local storage is used.
To configure, add ASSET_STORAGE_DIR=<ASSET_DIR_ON_HOST>
to the .env
file before deploying.
Note
Make sure the directory ASSET_DIR_ON_HOST
is writable by non root users. You can try running: chmod -R 777 <ASSET_DIR_ON_HOST>
to make it writable.
Configure the Input Video Streams Directory#
You might want to skip uploading files using Gradio and instead add them from a local path.
To do this, use EXAMPLE_STREAMS_DIR
environment config, which allows you to specify
a directory containing sample streams for Gradio UI to load.
For each video file, create a poster image file with name <video.mp4>.poster.jpg
. Example command to generate a poster image:
ffmpeg -i <video.mp4> -vframes 1 <video.mp4>.poster.jpg
The SAMPLE_STREAMS_DIR_ON_HOST
contents should look like this:
ls <SAMPLE_STREAMS_DIR_ON_HOST>/
video1.mp4 video1.mp4.poster.jpg video2.mp4 video2.mp4.poster.jpg image1.jpg image2.jpg
To configure, add EXAMPLE_STREAMS_DIR=<SAMPLE_STREAMS_DIR_ON_HOST>
to the .env
file before deploying.