toolss180 commited on
Commit
8289123
·
verified ·
1 Parent(s): c8dd008

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -11
Dockerfile CHANGED
@@ -1,15 +1,20 @@
1
- FROM alpine:3.20
2
 
3
- RUN apk add --no-cache ca-certificates curl unzip nginx
4
 
5
- RUN curl -L -o /tmp/xray.zip https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip \
6
- && mkdir -p /tmp/xray \
7
- && unzip /tmp/xray.zip -d /tmp/xray \
8
- && mv /tmp/xray/xray /usr/local/bin/xray \
9
- && chmod +x /usr/local/bin/xray \
10
- && rm -rf /tmp/xray /tmp/xray.zip
11
 
12
- COPY start.sh /start.sh
13
- RUN chmod +x /start.sh
14
 
15
- CMD ["/start.sh"]
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
 
3
+ WORKDIR /app
4
 
5
+ RUN apt-get update && apt-get install -y --no-install-recommends \
6
+ build-essential cmake git ninja-build && rm -rf /var/lib/apt/lists/*
 
 
 
 
7
 
8
+ COPY . .
 
9
 
10
+ ENV CMAKE_BUILD_PARALLEL_LEVEL=4
11
+ ENV FORCE_CMAKE=1
12
+
13
+ RUN pip install --no-cache-dir fastapi uvicorn pydantic huggingface_hub
14
+ RUN pip install --no-cache-dir --prefer-binary \
15
+ llama-cpp-python \
16
+ --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
17
+
18
+ ENV HF_HOME=/app/hf_cache
19
+ EXPOSE 7860
20
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]