k-recipe2vec / backend /Dockerfile
๊ฐ•๋ฏผ๊ท 
Refactor: Combine Backend and Frontend into Monorepo structure
9f03b39
raw
history blame contribute delete
596 Bytes
FROM python:3.9-slim
# ๋ณด์•ˆ ๋ฐ ๊ถŒํ•œ ์„ค์ •์„ ์œ„ํ•œ ์œ ์ € ์ƒ์„ฑ (Hugging Face ๊ถŒ์žฅ ์‚ฌํ•ญ)
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# ์˜์กด์„ฑ ์„ค์น˜
COPY --chown=user requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# ์ฝ”๋“œ ๋ณต์‚ฌ (๋ชจ๋ธ ํŒŒ์ผ ํฌํ•จ)
COPY --chown=user . .
# ํฌํŠธ ์„ค์ • (Hugging Face๋Š” 7860 ํฌํŠธ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค)
EXPOSE 7860
# ์‹คํ–‰ ๋ช…๋ น์–ด
CMD ["uvicorn", "src.api:app", "--host", "0.0.0.0", "--port", "7860"]