forked from omeryusufyagci/fast-music-remover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (25 loc) · 1018 Bytes
/
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
FROM python:3.10-slim
ENV DEBIAN_FRONTEND=noninteractive
# Install dependencies (little heavy as FFmpeg devlibs are required)
RUN apt-get update && \
apt-get install -y build-essential cmake ffmpeg wget pkg-config \
libavcodec-dev libavformat-dev libavfilter-dev libavdevice-dev libswscale-dev && \
apt-get clean
# pkg manager doesn't find this?
RUN mkdir -p /usr/include/nlohmann && \
wget https://github.com/nlohmann/json/releases/download/v3.10.5/json.hpp -O /usr/include/nlohmann/json.hpp
WORKDIR /app
# Copy the project into the container/app
COPY . /app
# Compile the C++ project with a fresh CMakeCache (issues with cache not matching source)
RUN mkdir -p MediaProcessor/build && \
cd MediaProcessor/build && \
rm -rf CMakeCache.txt && \
cmake .. && \
make
# Install python dependencies
RUN pip install --no-cache-dir -r requirements.txt
ENV FLASK_APP=app.py
ENV FLASK_ENV=development
EXPOSE 8080
CMD ["flask", "run", "--host=0.0.0.0", "--port=8080"]