-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.ingest
52 lines (39 loc) · 1.69 KB
/
Dockerfile.ingest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM ubuntu:latest
# https://pythonspeed.com/articles/activate-conda-dockerfile/
WORKDIR /home
# Install base utilities
RUN apt-get update \
&& apt-get install -y build-essential \
&& apt-get install -y wget \
&& apt-get install -y git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# libgl1
RUN apt-get update \
&& apt-get install -y ffmpeg
# && apt-get install -y libsm6 \
# && apt-get install -y libxext6
# Install miniconda
ENV CONDA_DIR /opt/conda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda
# Put conda in path so we can use conda activate
ENV PATH=$CONDA_DIR/bin:$PATH
RUN conda create --name intheirownwords python=3.10 && \
conda env config vars set CUDA_HOME="/usr/local/cuda"
SHELL ["conda", "run", "-n", "intheirownwords", "/bin/bash", "-c"]
RUN conda install -y pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 pytorch-cuda=11.8 -c pytorch -c nvidia
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository -y ppa:alex-p/tesseract-ocr5 \
&& apt-get update \
&& apt-get install -y tesseract-ocr
RUN wget -O /usr/share/tesseract-ocr/5/tessdata/eng.traineddata https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata
# install required python libs
RUN pip install git+https://github.com/pyannote/pyannote-audio.git@develop
COPY setup/ingest-requirements.txt requirements.txt
RUN pip install -r requirements.txt
WORKDIR /home/intheirownwords
COPY src/*.py ./
ENV PYTHONUNBUFFERED=1
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "intheirownwords", "python", "-u", "main.py"]