File size: 1,603 Bytes
d0b92e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
47
48
49
50
51
52
53
54
55
56
FROM nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04

# ============================== #
# Εγκατάσταση εργαλείων συστήματος
# ============================== #

RUN apt-get update && apt-get install -y \
    git \
    build-essential \
    cmake \
    libgl1-mesa-glx \
    libglib2.0-0 \
    ffmpeg \
    poppler-utils \
    python3.10 \
    python3.10-venv \
    python3.10-dev \
    python3-pip \
    && rm -rf /var/lib/apt/lists/*

# ============================== #
# Ρύθμιση Python ως default
# ============================== #
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1

# ============================== #
# Δημιουργία φακέλου εφαρμογής
# ============================== #
WORKDIR /app

# ============================== #
# Αντιγραφή requirements.txt
# ============================== #
COPY requirements.txt requirements.txt

# ============================== #
# Εγκατάσταση Python βιβλιοθηκών
# ============================== #
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt

# ============================== #
# Αντιγραφή υπόλοιπου κώδικα
# ============================== #
COPY . .

# ============================== #
# Άνοιγμα πόρτας Streamlit
# ============================== #
EXPOSE 7860

# ============================== #
# Εκκίνηση εφαρμογής Streamlit
# ============================== #
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]