Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cog.yaml #272

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 19 additions & 27 deletions cog.yaml
Original file line number Diff line number Diff line change
@@ -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"