-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 788 Bytes
/
Dockerfile
File metadata and controls
31 lines (23 loc) · 788 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
30
31
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /usr/src/app
# Install build dependencies for Rust compilation
RUN apt-get update && apt-get install -y \
gcc \
g++ \
make \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy the current directory contents into the container
COPY . .
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Install the package in development mode before running tests
RUN pip install -e .
# Install pytest for running tests
RUN pip install pytest
# Run unit tests
RUN pytest tests/
# Set the default command to run the optimization example
CMD ["python", "-m", "unittest", "discover", "-s", "tests"]