tieuhung commited on
Commit
9207e47
·
verified ·
1 Parent(s): 088d9f4

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -0
Dockerfile ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+ WORKDIR /app
3
+ RUN apt-get update && apt-get install -y --no-install-recommends \
4
+ build-essential cmake git ninja-build && rm -rf /var/lib/apt/lists/*
5
+ COPY . .
6
+ ENV CMAKE_BUILD_PARALLEL_LEVEL=4
7
+ ENV FORCE_CMAKE=1
8
+ RUN pip install --no-cache-dir fastapi uvicorn pydantic huggingface_hub
9
+ RUN pip install --no-cache-dir --prefer-binary llama-cpp-python \
10
+ --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
11
+ ENV HF_HOME=/app/hf_cache
12
+ EXPOSE 7860
13
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]