Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +12 -6
Dockerfile
CHANGED
@@ -1,20 +1,26 @@
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
-
# Install system dependencies
|
4 |
-
RUN apt-get update && apt-get install -y
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
-
#
|
7 |
RUN mkdir -p /tmp/cache && chmod 777 /tmp/cache
|
8 |
ENV HF_HOME=/tmp/cache
|
9 |
|
|
|
10 |
WORKDIR /app
|
11 |
COPY . .
|
12 |
|
13 |
# Install Python dependencies
|
14 |
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
|
16 |
-
# Expose correct port
|
17 |
EXPOSE 8080
|
18 |
|
19 |
-
#
|
20 |
-
CMD ["python", "app.py"]
|
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
+
# Install system dependencies (GGUF models might also need libstdc++)
|
4 |
+
RUN apt-get update && apt-get install -y \
|
5 |
+
build-essential \
|
6 |
+
cmake \
|
7 |
+
libstdc++6 \
|
8 |
+
&& apt-get clean \
|
9 |
+
&& rm -rf /var/lib/apt/lists/*
|
10 |
|
11 |
+
# Set cache directory for Hugging Face
|
12 |
RUN mkdir -p /tmp/cache && chmod 777 /tmp/cache
|
13 |
ENV HF_HOME=/tmp/cache
|
14 |
|
15 |
+
# Set working directory and copy all files
|
16 |
WORKDIR /app
|
17 |
COPY . .
|
18 |
|
19 |
# Install Python dependencies
|
20 |
RUN pip install --no-cache-dir -r requirements.txt
|
21 |
|
22 |
+
# Expose correct port for HF Spaces
|
23 |
EXPOSE 8080
|
24 |
|
25 |
+
# Start your application
|
26 |
+
CMD ["python", "app.py"]
|