forked from vaheed/sip-ai-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (39 loc) · 1000 Bytes
/
Dockerfile
File metadata and controls
46 lines (39 loc) · 1000 Bytes
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
FROM python:3.9-slim
WORKDIR /app
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libpcap-dev \
portaudio19-dev \
python3-dev \
wget \
git \
swig \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Install PJSIP and pjsua2
RUN cd /tmp && \
wget https://github.com/pjsip/pjproject/archive/2.12.tar.gz && \
tar -xzf 2.12.tar.gz && \
cd pjproject-2.12 && \
./configure --enable-shared && \
make dep && \
make && \
make install && \
ldconfig && \
cd pjsip-apps/src/swig && \
make python && \
cd python && \
python setup.py install
# Install other Python packages
COPY requirements.txt .
RUN sed -i '/pjsua2==2.12/d' requirements.txt && \
pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir "werkzeug<3.0.0" "flask<3.0.0"
# Copy application code
COPY app/ .
# Expose ports
EXPOSE 8080
EXPOSE 5060/udp
EXPOSE 16000-16100/udp
CMD ["python", "agent.py"]