-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (26 loc) · 1.08 KB
/
Copy pathDockerfile
File metadata and controls
34 lines (26 loc) · 1.08 KB
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
# Use the official Python image from the Docker Hub
FROM pytorch/pytorch:2.5.0-cuda12.4-cudnn9-devel
LABEL maintainer="philippe.saade@wikimedia.de"
# Upgrade the pip, git and ubuntu versions to the most recent version
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --upgrade pip setuptools wheel
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file into the container
COPY ./docker/3_Add_Wikidata_to_AstraDB/requirements.txt requirements.txt
# Install the dependencies
RUN pip install torch==2.5.0 torchvision==0.20.0 torchaudio==2.5.0 --index-url https://download.pytorch.org/whl/cu124
RUN pip install flash-attn
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code into the container
COPY ./docker/3_Add_Wikidata_to_AstraDB /app
COPY ./src /src
COPY ./API_tokens /API_tokens
# Set up the volume for the data folder
VOLUME [ "/data" ]
ENV PYTHONPATH="${PYTHONPATH}:/"
# Run the Python script
CMD ["python", "run.py"]