Jayant-Kernel commited on
Commit ·
6452e7e
1
Parent(s): 11baf5d
fix: remove multiline python heredoc from Dockerfile
Browse files- Dockerfile +4 -22
Dockerfile
CHANGED
|
@@ -4,7 +4,7 @@ ENV PYTHONUNBUFFERED=1
|
|
| 4 |
ENV HF_HOME=/tmp/huggingface
|
| 5 |
ENV HOME=/tmp
|
| 6 |
ENV TORCHINDUCTOR_CACHE_DIR=/tmp/torch_cache
|
| 7 |
-
ENV PYTHONPATH=/app:/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 |
|
|
@@ -22,30 +22,12 @@ RUN pip install --no-cache-dir \
|
|
| 22 |
bitsandbytes==0.41.3 \
|
| 23 |
wandb datasets huggingface_hub matplotlib Pillow
|
| 24 |
|
| 25 |
-
RUN pip install --no-cache-dir \
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
RUN python -c "
|
| 29 |
-
import subprocess
|
| 30 |
-
result = subprocess.run(['find', '/', '-name', 'environment.py', '-path', '*/deceit_env/*'],
|
| 31 |
-
capture_output=True, text=True)
|
| 32 |
-
print(result.stdout)
|
| 33 |
-
"
|
| 34 |
-
|
| 35 |
-
RUN python -c "
|
| 36 |
-
import importlib.util, os
|
| 37 |
-
spec = importlib.util.find_spec('deceit_env')
|
| 38 |
-
if spec:
|
| 39 |
-
pkg_dir = os.path.dirname(spec.origin)
|
| 40 |
-
data_dst = os.path.join(pkg_dir, 'data')
|
| 41 |
-
print(f'Package at: {pkg_dir}')
|
| 42 |
-
os.makedirs(data_dst, exist_ok=True)
|
| 43 |
-
print(f'Data dir created: {data_dst}')
|
| 44 |
-
" || echo "deceit_env not found"
|
| 45 |
|
| 46 |
RUN mkdir -p /usr/local/lib/python3.10/site-packages/deceit_env/data/ && \
|
| 47 |
mkdir -p /usr/local/lib/python3.10/site-packages/deceit_env/server/ && \
|
| 48 |
-
touch /usr/local/lib/python3.10/site-packages/deceit_env/server/__init__.py
|
| 49 |
|
| 50 |
COPY data/ /app/data/
|
| 51 |
COPY data/ /usr/local/lib/python3.10/site-packages/deceit_env/data/
|
|
|
|
| 4 |
ENV HF_HOME=/tmp/huggingface
|
| 5 |
ENV HOME=/tmp
|
| 6 |
ENV TORCHINDUCTOR_CACHE_DIR=/tmp/torch_cache
|
| 7 |
+
ENV PYTHONPATH=/app:/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 |
|
|
|
|
| 22 |
bitsandbytes==0.41.3 \
|
| 23 |
wandb datasets huggingface_hub matplotlib Pillow
|
| 24 |
|
| 25 |
+
RUN pip install --no-cache-dir git+https://github.com/Jayant-kernel/DECEIT-the-ai-truth-environment-.git && \
|
| 26 |
+
python -c "import deceit_env; print('deceit_env found')"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
RUN mkdir -p /usr/local/lib/python3.10/site-packages/deceit_env/data/ && \
|
| 29 |
mkdir -p /usr/local/lib/python3.10/site-packages/deceit_env/server/ && \
|
| 30 |
+
touch /usr/local/lib/python3.10/site-packages/deceit_env/server/__init__.py
|
| 31 |
|
| 32 |
COPY data/ /app/data/
|
| 33 |
COPY data/ /usr/local/lib/python3.10/site-packages/deceit_env/data/
|