Jayant-Kernel commited on
Commit ·
73c82af
1
Parent(s): 10648d1
fix: use huggingface transformers-pytorch-gpu base image
Browse files- Dockerfile +5 -21
Dockerfile
CHANGED
|
@@ -1,35 +1,19 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
ENV PYTHONUNBUFFERED=1
|
| 4 |
ENV HF_HOME=/tmp/huggingface
|
| 5 |
ENV HOME=/tmp
|
| 6 |
ENV TORCHINDUCTOR_CACHE_DIR=/tmp/torch_cache
|
| 7 |
|
| 8 |
-
RUN apt-get update && apt-get install -y git build-essential && rm -rf /var/lib/apt/lists/*
|
| 9 |
-
|
| 10 |
-
RUN useradd -m -u 1000 trainer
|
| 11 |
-
USER trainer
|
| 12 |
-
ENV HOME=/home/trainer
|
| 13 |
-
ENV HF_HOME=/home/trainer/.cache/huggingface
|
| 14 |
-
ENV TORCHINDUCTOR_CACHE_DIR=/home/trainer/.cache/torch
|
| 15 |
-
|
| 16 |
WORKDIR /app
|
| 17 |
|
| 18 |
-
RUN pip install --no-cache-dir torch==2.1.0 --index-url https://download.pytorch.org/whl/cu121
|
| 19 |
-
|
| 20 |
-
RUN pip install --no-cache-dir \
|
| 21 |
-
transformers==4.36.0 \
|
| 22 |
-
accelerate==0.25.0 \
|
| 23 |
-
peft==0.7.1 \
|
| 24 |
-
trl==0.7.4 \
|
| 25 |
-
bitsandbytes==0.41.3 \
|
| 26 |
-
wandb datasets huggingface_hub matplotlib Pillow
|
| 27 |
-
|
| 28 |
RUN pip install --no-cache-dir \
|
|
|
|
|
|
|
| 29 |
git+https://github.com/Jayant-kernel/DECEIT-the-ai-truth-environment-.git
|
| 30 |
|
| 31 |
-
RUN mkdir -p /
|
| 32 |
-
COPY data/ /
|
| 33 |
COPY data/ /app/data/
|
| 34 |
COPY train.py .
|
| 35 |
COPY evaluate.py .
|
|
|
|
| 1 |
+
FROM huggingface/transformers-pytorch-gpu:latest
|
| 2 |
|
| 3 |
ENV PYTHONUNBUFFERED=1
|
| 4 |
ENV HF_HOME=/tmp/huggingface
|
| 5 |
ENV HOME=/tmp
|
| 6 |
ENV TORCHINDUCTOR_CACHE_DIR=/tmp/torch_cache
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
WORKDIR /app
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
RUN pip install --no-cache-dir \
|
| 11 |
+
peft trl bitsandbytes wandb datasets \
|
| 12 |
+
huggingface_hub matplotlib Pillow \
|
| 13 |
git+https://github.com/Jayant-kernel/DECEIT-the-ai-truth-environment-.git
|
| 14 |
|
| 15 |
+
RUN mkdir -p /usr/local/lib/python3.10/site-packages/deceit_env/data/
|
| 16 |
+
COPY data/ /usr/local/lib/python3.10/site-packages/deceit_env/data/
|
| 17 |
COPY data/ /app/data/
|
| 18 |
COPY train.py .
|
| 19 |
COPY evaluate.py .
|