cxeep commited on
Commit
70faeef
·
verified ·
1 Parent(s): 292236c

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +64 -0
Dockerfile ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.8-slim
2
+ # src https://github.com/sakemin/SOME/blob/main/Dockerfile
3
+
4
+ # Build argument to specify whether to install PyTorch with CUDA support
5
+ ARG WITH_CUDA=0
6
+
7
+ WORKDIR /app
8
+
9
+ RUN apt-get update && apt-get install -y \
10
+ build-essential \
11
+ libsndfile1 \
12
+ ffmpeg \
13
+ wget \
14
+ unzip \
15
+ git \
16
+ && rm -rf /var/lib/apt/lists/*
17
+
18
+ RUN git clone https://github.com/sakemin/SOME
19
+
20
+ COPY SOME/* .
21
+
22
+ RUN pip install --upgrade pip==24.0 && \
23
+ if [ "$WITH_CUDA" = "1" ]; then \
24
+ pip install torch==2.1.0 --index-url https://download.pytorch.org/whl/cu118; \
25
+ else \
26
+ pip install torch==2.1.0 --index-url https://download.pytorch.org/whl/cpu; \
27
+ fi && \
28
+ pip install -r requirements.txt
29
+
30
+
31
+ # Create directory for pretrained models and download model checkpoints
32
+ RUN mkdir -p pretrained && \
33
+ cd pretrained && \
34
+ # Download SOMEv0.0.1 model
35
+ wget -q https://github.com/openvpi/SOME/releases/download/v0.0.1/0918_continuous256_clean_3spk_fixmel.zip && \
36
+ unzip 0918_continuous256_clean_3spk_fixmel.zip && \
37
+ rm 0918_continuous256_clean_3spk_fixmel.zip && \
38
+ # Download SOMEv1 model
39
+ wget -q https://github.com/openvpi/SOME/releases/download/v1.0.0-baseline/0119_continuous128_5spk.zip && \
40
+ unzip 0119_continuous128_5spk.zip && \
41
+ rm 0119_continuous128_5spk.zip && \
42
+ # Download RMVPE model
43
+ wget -q https://github.com/yxlllc/RMVPE/releases/download/230917/rmvpe.zip && \
44
+ unzip rmvpe.zip && \
45
+ mkdir -p rmvpe && \
46
+ mv model.pt rmvpe/model.pt && \
47
+ rm rmvpe.zip
48
+
49
+ # Add volume mount points for input and output files
50
+ VOLUME ["/app/input", "/app/output"]
51
+
52
+ CMD ["python", "webui.py", "--work_dir", "pretrained", "--addr", "0.0.0.0", "--port", "7860"]
53
+
54
+ # # Set entrypoint to run inference
55
+ # ENTRYPOINT ["python", "infer.py"]
56
+
57
+ # # Default command (can be overridden)
58
+ # CMD ["--help"]
59
+
60
+ # COPY --chown=user ./requirements.txt requirements.txt
61
+ # RUN pip install --no-cache-dir --upgrade -r requirements.txt
62
+
63
+ # COPY --chown=user . /app
64
+ # CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]