fix: stabilize summarizer docker build on production hosts
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
FROM python:3.11-slim
|
FROM python:3.11
|
||||||
ENV PIP_NO_CACHE_DIR=1 \
|
ENV PIP_NO_CACHE_DIR=1 \
|
||||||
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
||||||
PYTHONUNBUFFERED=1 \
|
PYTHONUNBUFFERED=1 \
|
||||||
@@ -6,9 +6,8 @@ ENV PIP_NO_CACHE_DIR=1 \
|
|||||||
HF_HUB_DISABLE_TELEMETRY=1
|
HF_HUB_DISABLE_TELEMETRY=1
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY requirements.txt ./
|
COPY requirements.txt ./
|
||||||
RUN pip install --upgrade pip setuptools wheel \
|
RUN python -m pip install --upgrade pip setuptools wheel \
|
||||||
&& pip install --extra-index-url https://download.pytorch.org/whl/cpu torch==2.5.1 \
|
&& python -m pip install --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.txt
|
||||||
&& pip install -r requirements.txt
|
|
||||||
COPY . .
|
COPY . .
|
||||||
EXPOSE 8001
|
EXPOSE 8001
|
||||||
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8001"]
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8001"]
|
||||||
|
|||||||
Reference in New Issue
Block a user