container_test / Docker
lingyit1108's picture
added docker files and app.py
8679f57
raw
history blame
707 Bytes
FROM python:3.9-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
git-lfs \
&& rm -rf /var/lib/apt/lists/*
RUN git lfs install
RUN echo "$ssh_prv_key" > /root/.ssh/id_rsa && \
echo "$ssh_pub_key" > /root/.ssh/id_rsa.pub && \
chmod 600 /root/.ssh/id_rsa && \
chmod 600 /root/.ssh/id_rsa.pub && \
ssh-keyscan github.com >> /root/.ssh/known_hosts && \
git pull && \
rm /root/.ssh/id_rsa*
COPY ./rag_test/requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
COPY . .
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]