-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (30 loc) · 1020 Bytes
/
Dockerfile
File metadata and controls
38 lines (30 loc) · 1020 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
37
38
# Use NVIDIA PyTorch base image with CUDA
# Due to dependencies of nvidia flare, we
# get dependency conflicts if we use too new
# an image here
FROM nvcr.io/nvidia/pytorch:24.04-py3
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1
# Update and install dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
wget \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:${PATH}"
# Create a working directory
WORKDIR /app/workspace
COPY models/xlm-roberta /app/xlm-roberta
COPY src /app/workspace/src
COPY .python-version /app/workspace
COPY pyproject.toml /app/workspace
COPY local_train.py /app/workspace
COPY federatedhealth_mlm_job /app/federatedhealth_mlm_job
COPY entrypoint.sh /app/workspace/entrypoint.sh
RUN uv sync
RUN --mount=type=cache,target=/root/.cache uv pip install -e .
RUN chmod +x /app/workspace/entrypoint.sh
ENTRYPOINT ["/app/workspace/entrypoint.sh"]