Spaces:
Running
Running
update dockerfile for llama cpp python build
Browse files- Dockerfile +5 -3
Dockerfile
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
-
# Use Ubuntu 22.04 as a public base image
|
2 |
FROM ubuntu:22.04
|
3 |
|
4 |
# Disable interactive prompts and preconfigure timezone
|
5 |
ENV DEBIAN_FRONTEND=noninteractive
|
6 |
ENV TZ=Etc/UTC
|
7 |
|
|
|
8 |
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
|
9 |
|
10 |
# Preseed tzdata to avoid interactive prompt
|
@@ -12,7 +13,7 @@ RUN echo "tzdata tzdata/Areas select Etc" > /tmp/tzdata.seed && \
|
|
12 |
echo "tzdata tzdata/Zones/Etc select UTC" >> /tmp/tzdata.seed && \
|
13 |
debconf-set-selections /tmp/tzdata.seed
|
14 |
|
15 |
-
# 1. Install OS-level dependencies
|
16 |
RUN echo "### STEP 1: Installing OS-level dependencies" && \
|
17 |
apt-get update && \
|
18 |
apt-get install -y --no-install-recommends \
|
@@ -20,6 +21,8 @@ RUN echo "### STEP 1: Installing OS-level dependencies" && \
|
|
20 |
build-essential \
|
21 |
cmake \
|
22 |
libopenblas-dev \
|
|
|
|
|
23 |
python3 \
|
24 |
python3-pip \
|
25 |
python3-opencv && \
|
@@ -29,7 +32,6 @@ RUN echo "### STEP 1: Installing OS-level dependencies" && \
|
|
29 |
RUN echo "### STEP 2: Preparing application directory"
|
30 |
WORKDIR /app
|
31 |
COPY requirements.txt ./
|
32 |
-
COPY packages.txt ./
|
33 |
COPY app.py ./
|
34 |
# COPY any other source files or directories as needed
|
35 |
|
|
|
1 |
+
# Use Ubuntu 22.04 as a public base image
|
2 |
FROM ubuntu:22.04
|
3 |
|
4 |
# Disable interactive prompts and preconfigure timezone
|
5 |
ENV DEBIAN_FRONTEND=noninteractive
|
6 |
ENV TZ=Etc/UTC
|
7 |
|
8 |
+
# Use bash with strict modes for debugging
|
9 |
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
|
10 |
|
11 |
# Preseed tzdata to avoid interactive prompt
|
|
|
13 |
echo "tzdata tzdata/Zones/Etc select UTC" >> /tmp/tzdata.seed && \
|
14 |
debconf-set-selections /tmp/tzdata.seed
|
15 |
|
16 |
+
# 1. Install OS-level dependencies, including pkg-config and git
|
17 |
RUN echo "### STEP 1: Installing OS-level dependencies" && \
|
18 |
apt-get update && \
|
19 |
apt-get install -y --no-install-recommends \
|
|
|
21 |
build-essential \
|
22 |
cmake \
|
23 |
libopenblas-dev \
|
24 |
+
pkg-config \
|
25 |
+
git \
|
26 |
python3 \
|
27 |
python3-pip \
|
28 |
python3-opencv && \
|
|
|
32 |
RUN echo "### STEP 2: Preparing application directory"
|
33 |
WORKDIR /app
|
34 |
COPY requirements.txt ./
|
|
|
35 |
COPY app.py ./
|
36 |
# COPY any other source files or directories as needed
|
37 |
|