KVInfer / Dockerfile
NOT-OMEGA's picture
Update Dockerfile
502ce94 verified
raw
history blame contribute delete
721 Bytes
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install -y \
g++ python3 python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Fix 1: Added huggingface-hub here
RUN pip3 install --no-cache-dir \
fastapi uvicorn tiktoken psutil httpx pydantic huggingface-hub
WORKDIR /app
COPY inference.cpp .
COPY main.py .
COPY index.html .
# Fix 2: Removed 'COPY model.bin .' from here
RUN g++ -O3 -march=x86-64 -mavx2 -mfma -fopenmp -ffast-math -std=c++17 \
-o inference inference.cpp && chmod +x inference
RUN useradd -m -u 1000 appuser && chown -R appuser:appuser /app
USER appuser
EXPOSE 7860
CMD uvicorn main:app --host 0.0.0.0 --port 7860 --no-access-log