PrintAI / Dockerfile
KennyOry's picture
Update Dockerfile
d5a1a4b verified
raw
history blame contribute delete
548 Bytes
FROM python:3.10-slim
WORKDIR /code
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
git-lfs \
libgomp1 \
libgl1 \
&& rm -rf /var/lib/apt/lists/*
RUN git lfs install
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN apt-get purge -y build-essential \
&& apt-get autoremove -y --purge \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY . .
RUN mkdir -p /tmp/models && chmod 777 /tmp/models
EXPOSE 7860
CMD ["python", "app.py"]