From 160384f2962714a2c2f5b9e512a293c928260237 Mon Sep 17 00:00:00 2001 From: medicobooks <120422589+medicobooks@users.noreply.github.com> Date: Tue, 24 Sep 2024 21:53:57 +0100 Subject: [PATCH] cog.yaml --- cog.yaml | 46 +++++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/cog.yaml b/cog.yaml index 6bf82eab..6cbcc707 100644 --- a/cog.yaml +++ b/cog.yaml @@ -1,29 +1,21 @@ -# Configuration for Cog ⚙️ -# Reference: https://github.com/replicate/cog/blob/main/docs/yaml.md +# cog.yaml build: - gpu: true - system_packages: - - "libgl1-mesa-glx" - - "libglib2.0-0" - - "ffmpeg" - python_version: "3.11" - python_packages: - - "torch==2.0.1" - - "torchvision==0.15.2" - - "basicsr==1.4.2" - - "kornia==0.5.1" - - "face-alignment==1.3.4" - - "ninja==1.10.2.3" - - "einops==0.4.1" - - "facexlib==0.2.5" - - "librosa==0.9.2" - - "cmake==3.27.7" - - "numpy==1.23.4" - run: - - pip install dlib - - mkdir -p /root/.pyenv/versions/3.11.6/lib/python3.11/site-packages/facexlib/weights/ && wget --output-document "/root/.pyenv/versions/3.11.6/lib/python3.11/site-packages/facexlib/weights/detection_Resnet50_Final.pth" "https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth" - - mkdir -p /root/.pyenv/versions/3.11.6/lib/python3.11/site-packages/facexlib/weights/ && wget --output-document "/root/.pyenv/versions/3.11.6/lib/python3.11/site-packages/facexlib/weights/parsing_parsenet.pth" "https://github.com/xinntao/facexlib/releases/download/v0.2.2/parsing_parsenet.pth" - - mkdir -p /root/.cache/torch/hub/checkpoints/ && wget --output-document "/root/.cache/torch/hub/checkpoints/s3fd-619a316812.pth" "https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth" - - mkdir -p /root/.cache/torch/hub/checkpoints/ && wget --output-document "/root/.cache/torch/hub/checkpoints/2DFAN4-cd938726ad.zip" "https://www.adrianbulat.com/downloads/python-fan/2DFAN4-cd938726ad.zip" -predict: "predict.py:Predictor" + # Specify the Python version you want to use + python_version: "3.8" + # Commands to install the dependencies + run: | + pip install -r requirements.txt + +# Define how to run the model +run: + # The command that runs the model + command: python main.py --video_path $input_video --audio_path $input_audio + # Define the inputs that the model will accept + inputs: + - name: input_video + type: path + description: "Path to the input video file" + - name: input_audio + type: path + description: "Path to the input audio file"