-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_dev
46 lines (40 loc) · 1.37 KB
/
Dockerfile_dev
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
# Base image for the container is python:3.10-slim-buster
FROM python:3.10-slim-buster
# Set environment variables
# Prevents Python from writing .pyc files to disc
ENV PYTHONDONTWRITEBYTECODE=1
# Prevents Python from buffering stdout and stderr
ENV PYTHONUNBUFFERED=1
# set noninteractive installation
ENV DEBIAN_FRONTEND=noninteractive
# create directories for the app
ENV HOME=/app
RUN mkdir $HOME
ENV APP_HOME=/app/arch
RUN mkdir $APP_HOME
RUN mkdir $APP_HOME/media
# Set the working directory
WORKDIR /app
# Install system dependencies (mainly libmagic and ffmpeg)
RUN apt update && \
apt install -y libmagic1 && \
apt install -y ffmpeg && \
apt install -y netcat && \
apt install -y curl && \
rm -rf /var/lib/apt/lists/*
# Copy the requirements.txt file and install the required packages
COPY requirements.txt requirements.txt
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Install optional packages (if face detection and ai-based search are activated)
RUN pip install tensorflow==2.10.0
RUN pip install opencv-python-headless==4.8.0.74
RUN pip install cvlib==0.2.7
RUN pip install sentence-transformers==3.0.1
RUN pip install requests==2.28.1
# copy entrypoint.sh
COPY entrypoint.dev.sh .
RUN sed -i 's/\r$//g' /app/entrypoint.dev.sh
RUN chmod +x /app/entrypoint.dev.sh
# Copy the current directory contents into the container at /app
COPY . .