Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +7 -0
Dockerfile
CHANGED
@@ -5,6 +5,7 @@ RUN useradd -m -u 1000 appuser
|
|
5 |
RUN mkdir -p /app/saved_models && chown -R appuser:appuser /app
|
6 |
COPY requirements.txt .
|
7 |
|
|
|
8 |
RUN apt-get update && apt-get install -y \
|
9 |
build-essential \
|
10 |
libatlas-base-dev \
|
@@ -12,8 +13,13 @@ RUN apt-get update && apt-get install -y \
|
|
12 |
swig \
|
13 |
git \
|
14 |
cmake \
|
|
|
15 |
&& rm -rf /var/lib/apt/lists/*
|
16 |
|
|
|
|
|
|
|
|
|
17 |
RUN git clone https://github.com/facebookresearch/faiss.git /faiss \
|
18 |
&& cd /faiss \
|
19 |
&& mkdir build && cd build \
|
@@ -21,6 +27,7 @@ RUN git clone https://github.com/facebookresearch/faiss.git /faiss \
|
|
21 |
&& make -j$(nproc) \
|
22 |
&& make install
|
23 |
|
|
|
24 |
RUN pip install --no-cache-dir -r requirements.txt
|
25 |
|
26 |
COPY . .
|
|
|
5 |
RUN mkdir -p /app/saved_models && chown -R appuser:appuser /app
|
6 |
COPY requirements.txt .
|
7 |
|
8 |
+
# Install build dependencies, including Python development tools
|
9 |
RUN apt-get update && apt-get install -y \
|
10 |
build-essential \
|
11 |
libatlas-base-dev \
|
|
|
13 |
swig \
|
14 |
git \
|
15 |
cmake \
|
16 |
+
python3-dev \
|
17 |
&& rm -rf /var/lib/apt/lists/*
|
18 |
|
19 |
+
# Install NumPy before building FAISS
|
20 |
+
RUN pip install --no-cache-dir numpy
|
21 |
+
|
22 |
+
# Build and install FAISS
|
23 |
RUN git clone https://github.com/facebookresearch/faiss.git /faiss \
|
24 |
&& cd /faiss \
|
25 |
&& mkdir build && cd build \
|
|
|
27 |
&& make -j$(nproc) \
|
28 |
&& make install
|
29 |
|
30 |
+
# Install remaining Python dependencies
|
31 |
RUN pip install --no-cache-dir -r requirements.txt
|
32 |
|
33 |
COPY . .
|