File size: 802 Bytes
2d965ee
cda2726
 
 
ee45758
cda2726
 
 
 
 
 
 
 
 
ee45758
 
 
 
cda2726
ee45758
 
cda2726
ee45758
 
cda2726
ee45758
 
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
FROM python:3.10-slim

WORKDIR /app

# Install system dependencies yang dibutuhkan
RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt ./
COPY src/ ./src/

# Upgrade pip dan install requirements (ditambah upgrade numpy langsung di sini untuk jaga-jaga)
RUN pip3 install --no-cache-dir --upgrade pip && \
    pip3 install --no-cache-dir -r requirements.txt && \
    pip3 install --no-cache-dir --upgrade numpy

# Berikan hak akses penuh ke direktori /app (Wajib untuk Hugging Face)
RUN chmod -R 777 /app

# Hugging Face menggunakan port 7860 secara default
EXPOSE 7860

# Gunakan port 7860 untuk Streamlit
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]