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

Add Dockerfile #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
36 changes: 36 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#FROM debian
FROM docker.io/nvidia/cuda:11.4.1-cudnn8-devel-ubuntu20.04

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install git ffmpeg python3-pip python3 curl

WORKDIR /workdir

# install nvm
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash

# setup nvm
RUN export NVM_DIR="$HOME/.nvm"; \
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"; \
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"; \
nvm install 14; \
nvm use 14; \
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp; \
chmod a+rx /usr/local/bin/yt-dlp

WORKDIR /workdir/generate-subtitles

COPY requirements.txt .

RUN pip install -r requirements.txt

COPY . .

RUN export NVM_DIR="$HOME/.nvm"; \
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"; \
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"; \
npm install

ENTRYPOINT export NVM_DIR="$HOME/.nvm"; \
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"; \
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"; \
export CONCURRENT_AMOUNT=1; npm start
1 change: 1 addition & 0 deletions launch-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
podman run --rm -it --hooks-dir=/usr/share/containers/oci/hooks.d/ --security-opt=label=disable -p 3000:3000 gscsh
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
numpy==1.23.1
openai-whisper