-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (27 loc) · 1 KB
/
Dockerfile
File metadata and controls
38 lines (27 loc) · 1 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
38
# Wähle das Basis-Image
FROM python:3.13.0-slim
# Install PostgreSQL development libraries required for psycopg2
# Install necessary dependencies
RUN apt-get update && apt-get install -y libpq-dev gcc curl && rm -rf /var/lib/apt/lists/*
# Install remove-background dependencies
RUN mkdir -p /root/.u2net && \
curl -L https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx -o /root/.u2net/u2net.onnx
# Set environment variables
ENV PYTHONUNBUFFERED=1
# Setze den Arbeitsverzeichnispfad
WORKDIR /app
# Kopiere Abhängigkeiten und installiere sie
COPY /requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Kopiere den Rest der App
COPY src/ .
# Copy the entire 'data' folder
COPY data/ data
# Exponiere den Flask-Port
EXPOSE 8085
# Copy the entrypoint script into the container
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Set the entrypoint script
ENTRYPOINT ["/entrypoint.sh"]
# CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8000", "src.app:app"]