chatbit-api / Dockerfile
Seounghyup's picture
Fix cache directory permission issue
d51e161
raw
history blame contribute delete
666 Bytes
FROM python:3.10-slim
WORKDIR /app
# ์‹œ์Šคํ…œ ํŒจํ‚ค์ง€ ์„ค์น˜
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
&& rm -rf /var/lib/apt/lists/*
# ์บ์‹œ ๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑ ๋ฐ ๊ถŒํ•œ ์„ค์ •
RUN mkdir -p /app/.cache && chmod 777 /app/.cache
# Hugging Face ์บ์‹œ ๊ฒฝ๋กœ ์„ค์ •
ENV HF_HOME=/app/.cache
ENV TRANSFORMERS_CACHE=/app/.cache
ENV HF_DATASETS_CACHE=/app/.cache
# Python ํŒจํ‚ค์ง€ ์„ค์น˜
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# ์•ฑ ํŒŒ์ผ ๋ณต์‚ฌ
COPY app.py .
# ํฌํŠธ ๋…ธ์ถœ
EXPOSE 7860
# FastAPI ์‹คํ–‰
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]