Spaces:
Sleeping
Sleeping
Upload 11 files
Browse files- Dockerfile +4 -2
- launcher.py +7 -1
- subgen.env +2 -2
Dockerfile
CHANGED
@@ -1,15 +1,17 @@
|
|
1 |
FROM nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu22.04
|
2 |
|
3 |
-
WORKDIR /
|
4 |
|
5 |
ADD https://raw.githubusercontent.com/McCloudS/subgen/main/requirements.txt /subgen/requirements.txt
|
6 |
|
7 |
RUN apt-get update \
|
8 |
&& apt-get install -y \
|
|
|
|
|
9 |
ffmpeg \
|
10 |
&& apt-get clean \
|
11 |
&& rm -rf /var/lib/apt/lists/* \
|
12 |
-
&& -r requirements.txt
|
13 |
|
14 |
ENV PYTHONUNBUFFERED=1
|
15 |
|
|
|
1 |
FROM nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu22.04
|
2 |
|
3 |
+
WORKDIR /subgen
|
4 |
|
5 |
ADD https://raw.githubusercontent.com/McCloudS/subgen/main/requirements.txt /subgen/requirements.txt
|
6 |
|
7 |
RUN apt-get update \
|
8 |
&& apt-get install -y \
|
9 |
+
python3 \
|
10 |
+
python3-pip \
|
11 |
ffmpeg \
|
12 |
&& apt-get clean \
|
13 |
&& rm -rf /var/lib/apt/lists/* \
|
14 |
+
&& pip3 install -r requirements.txt
|
15 |
|
16 |
ENV PYTHONUNBUFFERED=1
|
17 |
|
launcher.py
CHANGED
@@ -14,7 +14,13 @@ def install_packages_from_requirements(requirements_file):
|
|
14 |
subprocess.run(['pip3', 'install', '-r', requirements_file, '--upgrade'], check=True)
|
15 |
print("Packages installed successfully using pip3.")
|
16 |
except subprocess.CalledProcessError:
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
def download_from_github(url, output_file):
|
19 |
try:
|
20 |
with urllib.request.urlopen(url) as response, open(output_file, 'wb') as out_file:
|
|
|
14 |
subprocess.run(['pip3', 'install', '-r', requirements_file, '--upgrade'], check=True)
|
15 |
print("Packages installed successfully using pip3.")
|
16 |
except subprocess.CalledProcessError:
|
17 |
+
try:
|
18 |
+
# If pip3 fails, try installing with pip
|
19 |
+
subprocess.run(['pip', 'install', '-r', requirements_file, '--upgrade'], check=True)
|
20 |
+
print("Packages installed successfully using pip.")
|
21 |
+
except subprocess.CalledProcessError:
|
22 |
+
print("Failed to install packages using both pip3 and pip.")
|
23 |
+
|
24 |
def download_from_github(url, output_file):
|
25 |
try:
|
26 |
with urllib.request.urlopen(url) as response, open(output_file, 'wb') as out_file:
|
subgen.env
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
WHISPER_MODEL=
|
2 |
WEBHOOKPORT=9000
|
3 |
TRANSCRIBE_DEVICE=gpu
|
4 |
DEBUG=True
|
5 |
CLEAR_VRAM_ON_COMPLETE=False
|
6 |
-
APPEND=
|
|
|
1 |
+
WHISPER_MODEL=medium
|
2 |
WEBHOOKPORT=9000
|
3 |
TRANSCRIBE_DEVICE=gpu
|
4 |
DEBUG=True
|
5 |
CLEAR_VRAM_ON_COMPLETE=False
|
6 |
+
APPEND=False
|