Jayant-Kernel commited on
Commit
1058c6b
·
1 Parent(s): 845f95d

fix: back to python:3.10-slim for GPU, fix deceit_env path

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -17
Dockerfile CHANGED
@@ -1,36 +1,34 @@
1
- FROM nvidia/cuda:12.6.0-cudnn-runtime-ubuntu22.04
2
 
3
  ENV PYTHONUNBUFFERED=1
4
  ENV HF_HOME=/tmp/huggingface
5
  ENV HOME=/tmp
6
- ENV DEBIAN_FRONTEND=noninteractive
7
- ENV PYTHONPATH=/app:/usr/local/lib/python3.10/site-packages
8
 
9
- RUN apt-get update && apt-get install -y \
10
- python3.10 python3-pip git build-essential \
11
- && ln -s /usr/bin/python3.10 /usr/bin/python \
12
- && rm -rf /var/lib/apt/lists/*
13
 
14
  WORKDIR /app
15
 
16
- RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cu124
 
 
17
 
18
  RUN pip install --no-cache-dir \
19
- transformers accelerate peft trl \
20
- bitsandbytes wandb datasets \
21
- huggingface_hub matplotlib Pillow
 
 
 
22
 
23
  RUN pip install --no-cache-dir \
24
  git+https://github.com/Jayant-kernel/DECEIT-the-ai-truth-environment-.git
25
 
26
- RUN pip show deceit-env || echo "Package not found"
27
- RUN python -c "import deceit_env; print(deceit_env.__file__)" || echo "Import failed"
28
-
29
- RUN mkdir -p /usr/local/lib/python3.10/site-packages/deceit_env/data/ && \
30
- mkdir -p /app/deceit_env/data/
31
 
 
32
  COPY data/ /usr/local/lib/python3.10/site-packages/deceit_env/data/
33
- COPY data/ /app/deceit_env/data/
34
  COPY data/ /app/data/
35
  COPY train.py .
36
  COPY evaluate.py .
 
1
+ FROM python:3.10-slim
2
 
3
  ENV PYTHONUNBUFFERED=1
4
  ENV HF_HOME=/tmp/huggingface
5
  ENV HOME=/tmp
6
+ ENV TORCHINDUCTOR_CACHE_DIR=/tmp/torch_cache
7
+ ENV PYTHONPATH=/usr/local/lib/python3.10/site-packages
8
 
9
+ RUN apt-get update && apt-get install -y git build-essential && rm -rf /var/lib/apt/lists/*
 
 
 
10
 
11
  WORKDIR /app
12
 
13
+ RUN pip install --no-cache-dir numpy==1.26.4
14
+
15
+ RUN pip install --no-cache-dir torch==2.1.2 --index-url https://download.pytorch.org/whl/cu118
16
 
17
  RUN pip install --no-cache-dir \
18
+ transformers==4.36.2 \
19
+ accelerate==0.25.0 \
20
+ peft==0.7.1 \
21
+ trl==0.7.11 \
22
+ bitsandbytes==0.41.3 \
23
+ wandb datasets huggingface_hub matplotlib Pillow
24
 
25
  RUN pip install --no-cache-dir \
26
  git+https://github.com/Jayant-kernel/DECEIT-the-ai-truth-environment-.git
27
 
28
+ RUN python -c "import deceit_env; import os; print(os.path.dirname(deceit_env.__file__))"
 
 
 
 
29
 
30
+ RUN mkdir -p /usr/local/lib/python3.10/site-packages/deceit_env/data/
31
  COPY data/ /usr/local/lib/python3.10/site-packages/deceit_env/data/
 
32
  COPY data/ /app/data/
33
  COPY train.py .
34
  COPY evaluate.py .