** Thanks for Son Tran for the fixes on the installation guide. Here are the recommanded steps for installing ShortGPT:
You now need Docker to now run ShortGPT. If you can't run it with docker, please use the Google Colab.
First make a .env file with the API keys like this:
GEMINI_API_KEY=put_your_gemini_api_key_here
OPENAI_API_KEY=sk-_put_your_openai_api_key_here
ELEVENLABS_API_KEY=put_your_eleven_labs_api_key_here
PEXELS_API_KEY=put_your_pexels_api_key_hereTo run Dockerfile do this:
docker build -t short_gpt_docker:latest .
docker run -p 31415:31415 --env-file .env short_gpt_docker:latestExport Docker image:
docker save short_gpt_docker > short_gpt_docker.tarIn short, you need to use:
- Python 3.10
- openai package, then upgrade openai-whisper
- ffmpeg 4.2.3
sudo apt update && sudo apt upgrade
sudo apt install wget git libltdl-dev libjpeg-dev libpng-dev libtiff-dev libgif-dev libfreetype6-dev liblcms2-dev libxml2-dev wget build-essential libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-devwget https://www.python.org/ftp/python/3.10.3/Python-3.10.3.tgz
tar xzf Python-3.10.3.tgz
cd Python-3.10.3
./configure --enable-optimizations
make installTo check the Python version, use this command:
python3.10 -VTo use pip, use this command:
pip3.10 install <package-name>ShortGPT will accept this version of FFmpeg:
3.1. Install Build Dependencies:
sudo apt update
sudo apt build-dep ffmpeg3.2. Clone FFmpeg Source Code:
git clone https://git.ffmpeg.org/ffmpeg.git
cd ffmpeg
git checkout n4.2.33.3. Configure FFmpeg Build:
./configure --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-avisynth --enable-libopenmpt --enable-shared --disable-staticThis step checks for the necessary dependencies and configures the build based on your system.
3.4. Build FFmpeg:
make -j$(nproc)This step may take some time as it compiles the FFmpeg source code.
3.5. Install FFmpeg:
sudo make install3.6. Verify Installation:
ffmpeg -versionThis should display the version information, and you should see version 4.2.3.
Optional: Update Library Cache:
sudo ldconfigThis updates the dynamic linker run-time bindings.
That's it! You should now have FFmpeg version 4.2.3 installed on your Debian 11 system.
If you are still facing with "libavdevice.so.58" error when running ffmpeg, run this command to fix it, remember to change the path:
echo 'export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64/:/usr/local/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrcpip3.10 install -U openai-whisper