-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (22 loc) · 852 Bytes
/
Dockerfile
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
# Use the official Python image from the Docker Hub
FROM python:3.11-slim
# Set environment variables to prevent Python from writing .pyc files and to buffer stdout
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
# Set the working directory inside the container
WORKDIR /app
# Copy the requirements file, setup.py, and README.md into the container
COPY requirements.txt ./
COPY setup.py ./
COPY README.md ./
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code into the container
COPY mathlib/ mathlib/
COPY tests/ tests/
# Install the package
RUN pip install .
# Optional: Run tests (uncomment if you want to run tests in the container)
# RUN pytest
# Command to run your application (if you have an entry point script, replace with actual script)
# CMD ["python", "setup.py"]