Spaces:
Sleeping
Sleeping
Kongongong
commited on
Commit
β’
f772151
1
Parent(s):
1569911
Upload 2 files
Browse files- Dockerfile +24 -0
- requirements.txt +3 -0
Dockerfile
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10.12-slim
|
2 |
+
|
3 |
+
WORKDIR /
|
4 |
+
|
5 |
+
RUN apt-get update && apt-get install -y build-essential
|
6 |
+
|
7 |
+
COPY requirements.txt /requirements.txt
|
8 |
+
|
9 |
+
RUN pip install -r requirements.txt
|
10 |
+
|
11 |
+
RUN useradd -m -u 1000 user
|
12 |
+
USER user
|
13 |
+
|
14 |
+
COPY --chown=user:user app /app
|
15 |
+
|
16 |
+
COPY --chown=user:user models /models
|
17 |
+
|
18 |
+
RUN sha256sum /models/Wllama-phys-8b.gguf
|
19 |
+
|
20 |
+
# EXPOSE 7860
|
21 |
+
|
22 |
+
ENV PYTHONUNBUFFERED=1
|
23 |
+
|
24 |
+
CMD ["uvicorn", "app.main:app", "--port", "7860", "--host", "0.0.0.0"]
|
requirements.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
uvicorn[standard]
|
2 |
+
fastapi
|
3 |
+
llama-cpp-python
|