Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +15 -33
Dockerfile
CHANGED
@@ -1,41 +1,23 @@
|
|
1 |
-
|
2 |
-
FROM python:3.11.9-alpine3.20
|
3 |
|
4 |
-
# Just for sure everything will be fine.
|
5 |
-
# ALSO ITS BAD! But since its docker, probably.. screw it?
|
6 |
-
USER root
|
7 |
-
|
8 |
-
# Installing gcc compiler and main library.
|
9 |
-
RUN apk update && apk add wget build-base python3-dev musl-dev linux-headers
|
10 |
-
RUN CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python
|
11 |
-
# Install Ollama server
|
12 |
-
# Set working directory for the app
|
13 |
-
RUN mkdir app
|
14 |
-
COPY . /app
|
15 |
-
RUN chmod -R 777 /app
|
16 |
WORKDIR /app
|
17 |
|
18 |
-
# Install
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
#RUN mkdir -p /.ollama && chmod 777 /.ollama
|
23 |
|
24 |
-
#
|
25 |
-
|
|
|
26 |
|
27 |
-
# Copy
|
28 |
-
COPY .
|
|
|
29 |
|
30 |
-
#
|
31 |
-
|
32 |
-
RUN mkdir -p /.config/matplotlib -m 777
|
33 |
-
RUN chmod -R 777 /.cache
|
34 |
-
RUN chmod -R 777 /.config
|
35 |
|
36 |
-
|
37 |
-
RUN python3 -m pip install -U pip setuptools wheel
|
38 |
-
RUN python3 -m pip install gradio
|
39 |
|
40 |
-
|
41 |
-
CMD ["python","app.py"]
|
|
|
1 |
+
FROM python:3.11-slim
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
WORKDIR /app
|
4 |
|
5 |
+
# Install system dependencies
|
6 |
+
RUN apt-get update && \
|
7 |
+
apt-get install -y curl && \
|
8 |
+
rm -rf /var/lib/apt/lists/*
|
|
|
9 |
|
10 |
+
# Copy setup.sh and run it
|
11 |
+
COPY setup.sh .
|
12 |
+
RUN chmod +x setup.sh && ./setup.sh
|
13 |
|
14 |
+
# Copy requirements and install Python dependencies
|
15 |
+
COPY requirements.txt .
|
16 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
17 |
|
18 |
+
# Copy app code
|
19 |
+
COPY app.py .
|
|
|
|
|
|
|
20 |
|
21 |
+
EXPOSE 8501
|
|
|
|
|
22 |
|
23 |
+
CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0"]
|
|