-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (39 loc) · 1.15 KB
/
Dockerfile
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
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu20.04
# set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt remove python-pip python3-pip \
&& apt-get install --no-install-recommends -y \
build-essential \
ca-certificates \
curl \
g++ \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer1.0-dev \
libgtk2.0-dev \
libgtk-3-dev \
libpng-dev \
libjpeg-dev \
libopenexr-dev\
libtiff-dev \
libwebp-dev \
python3.8 \
python3.8-dev \
python3.8-distutils \
&& rm -rf /var/lib/apt/lists/* \
&& cd /tmp \
&& curl -O https://bootstrap.pypa.io/get-pip.py \
&& python3.8 get-pip.py \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 \
&& update-alternatives --install /usr/local/bin/pip pip /usr/local/bin/pip3.8 1
WORKDIR /app
COPY ./requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt
COPY ./src/ /app/
EXPOSE 8000
CMD ["celery", "-A", "worker", "worker", "--loglevel=info", "--pool=solo"]