-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 922 Bytes
/
Dockerfile
File metadata and controls
36 lines (28 loc) · 922 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
32
33
34
35
36
# Use the official Python base image with your desired version
FROM python:3.10-slim
# Set environment variables
ENV TZ=Europe/Zurich
ENV PYTHONUNBUFFERED=1
# Install necessary dependencies
RUN apt-get update && apt-get install -y \
wget \
bzip2 \
ca-certificates \
curl \
git \
# Install tzdata to set the timezone, otherwise timing tests of probtest will fail with
# ValueError: time data 'Sun Jun 26 20:11:23 CEST 2022' does not match format '%a %b %d %H:%M:%S %Z %Y'
tzdata \
&& apt-get clean
RUN mkdir -p /etc/ld.so.conf.d
COPY . /probtest
# Set the working directory
WORKDIR /probtest
# Install Python dependencies from requirements.txt
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
RUN pip install -r requirements_test.txt
# Test probtest
RUN pytest -v -s --cov --cov-report=term tests/
SHELL ["/bin/bash", "-c"]
ENTRYPOINT ["python3", "probtest.py"]