pose-like / Dockerfile
huggysynuo's picture
Update Dockerfile
8e5014f verified
Raw
History Blame Contribute Delete
814 Bytes
FROM python:3.10-slim
# ์ž‘์—… ๋””๋ ‰ํ† ๋ฆฌ
WORKDIR /app
# ํ•„์ˆ˜ ํŒจํ‚ค์ง€ ์„ค์น˜
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
&& rm -rf /var/lib/apt/lists/*
# Hugging Face ์บ์‹œ ๋””๋ ‰ํ† ๋ฆฌ
RUN mkdir -p /app/hf_cache && chmod -R 777 /app/hf_cache
ENV TRANSFORMERS_CACHE=/app/hf_cache
ENV HF_HOME=/app/hf_cache
# ์˜์กด์„ฑ ์„ค์น˜
COPY requirements.txt ./
COPY src/ ./src/
RUN pip install --no-cache-dir -r requirements.txt
# ํฌํŠธ/ํ—ฌ์Šค์ฒดํฌ
EXPOSE 8501
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
# ์‹คํ–‰
ENTRYPOINT ["streamlit", "run", "src/app.py", "--server.port=8501", "--server.address=0.0.0.0"]