Spaces:
Running
Running
update dockerfile
Browse files- Dockerfile +14 -5
Dockerfile
CHANGED
@@ -1,23 +1,32 @@
|
|
1 |
# Use Ubuntu 22.04 as a public base image to avoid GHCR permissions
|
2 |
FROM ubuntu:22.04
|
3 |
|
4 |
-
#
|
|
|
|
|
|
|
|
|
5 |
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
|
6 |
|
7 |
# 1. Install OS-level dependencies
|
8 |
RUN echo "### STEP 1: Installing OS-level dependencies" && \
|
9 |
apt-get update && \
|
10 |
apt-get install -y --no-install-recommends \
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
# 2. Prepare the application directory
|
15 |
-
RUN echo "### STEP 2:
|
16 |
WORKDIR /app
|
17 |
COPY requirements.txt ./
|
18 |
-
COPY packages.txt ./
|
19 |
COPY app.py ./
|
20 |
-
#
|
21 |
|
22 |
# 3. Install Python dependencies (excluding llama-cpp-python)
|
23 |
RUN echo "### STEP 3: Installing Python dependencies" && \
|
|
|
1 |
# Use Ubuntu 22.04 as a public base image to avoid GHCR permissions
|
2 |
FROM ubuntu:22.04
|
3 |
|
4 |
+
# Disable interactive prompts and set timezone for tzdata
|
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 |
# 1. Install OS-level dependencies
|
12 |
RUN echo "### STEP 1: Installing OS-level dependencies" && \
|
13 |
apt-get update && \
|
14 |
apt-get install -y --no-install-recommends \
|
15 |
+
tzdata \
|
16 |
+
build-essential \
|
17 |
+
cmake \
|
18 |
+
libopenblas-dev \
|
19 |
+
python3 \
|
20 |
+
python3-pip \
|
21 |
+
python3-opencv && \
|
22 |
rm -rf /var/lib/apt/lists/*
|
23 |
|
24 |
# 2. Prepare the application directory
|
25 |
+
RUN echo "### STEP 2: Preparing application directory"
|
26 |
WORKDIR /app
|
27 |
COPY requirements.txt ./
|
|
|
28 |
COPY app.py ./
|
29 |
+
# Copy any other source files or directories needed by your app
|
30 |
|
31 |
# 3. Install Python dependencies (excluding llama-cpp-python)
|
32 |
RUN echo "### STEP 3: Installing Python dependencies" && \
|