Break / Dockerfile
RDS777's picture
Update Dockerfile
78ff70c verified
Raw History Blame Contribute Delete
584 Bytes
FROM pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime
RUN apt-get update && apt-get install -y --no-install-recommends \
git curl build-essential libgomp1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
COPY . .
RUN mkdir -p /app/data/chroma_db /app/data/repo
RUN useradd -m -u 1000 user
RUN chown -R user:user /app
USER user
EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1", "--log-level", "warning"]