-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 763 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.11-slim
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
# Set the working directory
WORKDIR /app
# Install build dependencies
RUN apt-get update && apt-get install -y build-essential && rm -rf /var/lib/apt/lists/*
# Upgrade pip and install only the dependencies needed for tests
RUN python -m pip install --upgrade pip setuptools wheel
RUN python -m pip install \
"numpy>=1.24.2" \
"scipy>=1.11.3" \
"Pillow>=9.4.0" \
"faiss-cpu>=1.7.3" \
"threatexchange>=1.0.13"
# Copy the project files
COPY . /app
# Install the package in editable mode without its heavy dependencies
RUN pip install --no-deps -e .
# Command to run the tests
CMD ["python", "-m", "unittest", "discover", "-s", "tests"]