-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile-celery
More file actions
38 lines (28 loc) · 1.47 KB
/
Dockerfile-celery
File metadata and controls
38 lines (28 loc) · 1.47 KB
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
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.10.14
# FROM python:3.10.14
# prepare the java env
WORKDIR /opt
# download jdk
RUN wget https://aka.ms/download-jdk/microsoft-jdk-17.0.9-linux-x64.tar.gz -O jdk.tar.gz && \
tar -xzf jdk.tar.gz && \
rm -rf jdk.tar.gz && \
mv jdk-17.0.9+8 jdk
# set the environment variable
ENV JAVA_HOME=/opt/jdk
WORKDIR /data-flow-celery
RUN echo "deb http://mirrors.aliyun.com/debian bookworm main contrib non-free" > /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/debian-security bookworm-security main contrib non-free" >> /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/debian bookworm-updates main contrib non-free" >> /etc/apt/sources.list
# install 3rd-party system dependencies
# RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 libpq-dev -y
RUN apt-get update && apt-get install libpq-dev libgl1-mesa-glx -y
RUN apt install git-lfs && git lfs install && apt clean && rm -rf /var/lib/apt/lists/*
# install data-flow then
COPY . .
ENV PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/
# Install deps
RUN pip install --no-cache-dir --use-deprecated=legacy-resolver -r docker/dataflow_requirements.txt
RUN git config --global user.email "dataflow@opencsg.com"
RUN git config --global user.name "dataflow"
RUN git config --global --add safe.directory '*'
CMD ["celery", "-A", "data_celery.main:celery_app", "worker", "--loglevel=info", "--pool=gevent", "--concurrency=5"]