cc-classification / Dockerfile
aephiday's picture
Update Dockerfile
ee45758 verified
Raw
History Blame Contribute Delete
802 Bytes
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"]