Skip to content

Commit 7adb1a7

Browse files
committed
added Dockerfile
1 parent 1db7a8f commit 7adb1a7

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

Dockerfile

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Use NVIDIA CUDA base image
2+
FROM docker.io/nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04
3+
4+
# Install sudo, git, wget, gcc, g++, and other essential build tools
5+
RUN apt-get update && \
6+
apt-get install -y sudo git wget build-essential && \
7+
apt-get clean && \
8+
rm -rf /var/lib/apt/lists/*
9+
10+
# Install Miniconda
11+
ENV CONDA_DIR=/opt/conda
12+
ENV PATH=$CONDA_DIR/bin:$PATH
13+
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \
14+
bash /tmp/miniconda.sh -b -p $CONDA_DIR && \
15+
rm /tmp/miniconda.sh
16+
17+
# Install Python 3.10 using Conda
18+
RUN conda install python=3.10
19+
20+
# Upgrade pip and setuptools to avoid deprecation warnings
21+
RUN pip install --upgrade pip setuptools
22+
23+
# Set Python 3.11 as default by creating a symbolic link
24+
RUN ln -sf /opt/conda/bin/python3.10 /opt/conda/bin/python && \
25+
ln -sf /opt/conda/bin/python3.10 /usr/bin/python
26+
27+
# Verify installations
28+
RUN python --version && \
29+
gcc --version && \
30+
g++ --version && \
31+
pip --version && \
32+
conda --version
33+
34+
RUN git clone --branch develop-server https://github.com/adalat-ai-tech/diart.git
35+
WORKDIR /diart
36+
37+
# Install diart dependencies
38+
RUN conda install portaudio pysoundfile ffmpeg -c conda-forge
39+
RUN pip install -e .
40+
41+
# Expose the port the app runs on
42+
EXPOSE 8080
43+
44+
# Define environment variable to prevent Python from buffering stdout/stderr
45+
# and writing byte code to file
46+
ENV PYTHONUNBUFFERED=1
47+
ENV PYTHONDONTWRITEBYTECODE=1
48+
49+
CMD ["python", "-m", "diart.console.serve", "--host", "0.0.0.0", "--port", "7007", "--segmentation", "pyannote/segmentation-3.0", "--embedding", "speechbrain/spkrec-resnet-voxceleb", "--tau-active", "0.45", "--rho-update", "0.25", "--delta-new", "0.6", "--latency", "5", "--max-speakers", "3"]

0 commit comments

Comments
 (0)