AI4deeperScience commited on
Commit
6c586fd
·
verified ·
1 Parent(s): 479ca5a

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # System libs needed by RDKit/matplotlib
6
+ RUN apt-get update && apt-get install -y --no-install-recommends \
7
+ libxrender1 libxext6 libglib2.0-0 \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Step 1: CPU-only torch (smaller, ~200MB vs 2.4GB for CUDA)
11
+ RUN pip install --no-cache-dir \
12
+ --extra-index-url https://download.pytorch.org/whl/cpu \
13
+ torch==2.4.0+cpu
14
+
15
+ # Step 2: PyG + everything else
16
+ RUN pip install --no-cache-dir \
17
+ torch_geometric==2.6.1 \
18
+ rdkit \
19
+ matplotlib \
20
+ gradio==5.49.1
21
+
22
+ # Non-root user required by HuggingFace
23
+ RUN useradd -m -u 1000 user
24
+ USER user
25
+ ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH
26
+
27
+ COPY --chown=user . /app
28
+
29
+ EXPOSE 7860
30
+
31
+ CMD ["python", "app.py"]