Skip to content

Commit 14dd5c1

Browse files
Optional GPU accelaration in Docker
1 parent 0ac367b commit 14dd5c1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
FROM python:3.12-slim
22

3+
#argument to enable GPU accelaration
4+
ARG GPU=false
5+
36
# Install (and build) requirements
47
COPY requirements.txt /requirements.txt
8+
COPY requirements_gpu.txt /requirements_gpu.txt
59
RUN apt-get clean && rm -rf /var/lib/apt/lists/* && \
610
apt-get update --fix-missing && \
711
apt-get install --allow-unauthenticated -y git curl && \
812
pip install -r requirements.txt && \
13+
if [ "$GPU" = true ]; then \
14+
pip install -r requirements_gpu.txt; \
15+
fi && \
916
apt-get clean && rm -rf /var/lib/apt/lists/*
1017

1118
COPY . .
@@ -72,4 +79,4 @@ CMD date; \
7279
echo "Running..."; \
7380
/main -r --words words/abbreviationList.csv
7481

75-
ENV TZ=US/Michigan
82+
ENV TZ=US/Michigan

0 commit comments

Comments
 (0)