Create Dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
# Install dependencies
|
| 6 |
+
RUN apt-get update && apt-get install -y build-essential wget git cmake
|
| 7 |
+
|
| 8 |
+
# Clone llama.cpp and build
|
| 9 |
+
RUN git clone https://github.com/ggerganov/llama.cpp
|
| 10 |
+
WORKDIR /app/llama.cpp
|
| 11 |
+
RUN make
|
| 12 |
+
|
| 13 |
+
# Go back to /app
|
| 14 |
+
WORKDIR /app
|
| 15 |
+
|
| 16 |
+
# Copy app files
|
| 17 |
+
COPY app.py .
|
| 18 |
+
|
| 19 |
+
# Expose port
|
| 20 |
+
EXPOSE 7860
|
| 21 |
+
|
| 22 |
+
# Run app
|
| 23 |
+
CMD ["python", "app.py"]
|