-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (34 loc) · 1.07 KB
/
Dockerfile
File metadata and controls
43 lines (34 loc) · 1.07 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
35
36
37
38
39
40
41
42
43
# FROM pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime
FROM pytorch/pytorch:2.10.0-cuda13.0-cudnn9-runtime
# Install kenlm
RUN apt-get update && apt-get install -y \
git \
build-essential \
libboost-all-dev \
cmake \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN git clone https://github.com/kpu/kenlm /opt/kenlm
RUN mkdir -p /opt/kenlm/build && cd /opt/kenlm/build \
&& cmake .. \
&& make -j $(nproc) \
&& make install
# Install uv
COPY --from=ghcr.io/astral-sh/uv:0.9.27 /uv /uvx /bin/
RUN mkdir /job
WORKDIR /job
# Copy project files and install dependencies
COPY pyproject.toml uv.lock .python-version ./
# Copy config files
COPY data_config.yaml config.yaml ./
# Copy .env files
# COPY .env ./
# Make sure torch is still visible in the venv
RUN uv venv --system-site-packages --clear
RUN uv sync --frozen --no-cache --no-dev
# RUN uv sync --frozen --no-cache
VOLUME ["/job/data", "/job/src", "/job/work", "/job/output"]
# You should install any dependencies you need here.
# RUN pip install tqdm