Spaces:
Running
Running
pos-egnn
Browse files- Dockerfile +0 -1
- Dockerfile-conda +0 -1
- models/pos_egnn/load.py +2 -1
- requirements.txt +1 -1
Dockerfile
CHANGED
|
@@ -4,7 +4,6 @@ WORKDIR /app
|
|
| 4 |
COPY requirements.txt .
|
| 5 |
RUN pip install -r --no-cache-dir requirements.txt
|
| 6 |
# preload models
|
| 7 |
-
RUN pip install torch_scatter==2.1.2
|
| 8 |
RUN python -c '\
|
| 9 |
from transformers import BartForConditionalGeneration, AutoTokenizer;\
|
| 10 |
AutoTokenizer.from_pretrained("ibm/materials.selfies-ted");\
|
|
|
|
| 4 |
COPY requirements.txt .
|
| 5 |
RUN pip install -r --no-cache-dir requirements.txt
|
| 6 |
# preload models
|
|
|
|
| 7 |
RUN python -c '\
|
| 8 |
from transformers import BartForConditionalGeneration, AutoTokenizer;\
|
| 9 |
AutoTokenizer.from_pretrained("ibm/materials.selfies-ted");\
|
Dockerfile-conda
CHANGED
|
@@ -8,7 +8,6 @@ RUN conda create --name fm4m python=3.9.7
|
|
| 8 |
RUN conda activate fm4m
|
| 9 |
COPY requirements.txt .
|
| 10 |
RUN pip install -r --no-cache-dir requirements.txt
|
| 11 |
-
RUN pip install torch_scatter==2.1.2
|
| 12 |
COPY . .
|
| 13 |
|
| 14 |
CMD ["python", "app.py"]
|
|
|
|
| 8 |
RUN conda activate fm4m
|
| 9 |
COPY requirements.txt .
|
| 10 |
RUN pip install -r --no-cache-dir requirements.txt
|
|
|
|
| 11 |
COPY . .
|
| 12 |
|
| 13 |
CMD ["python", "app.py"]
|
models/pos_egnn/load.py
CHANGED
|
@@ -23,7 +23,8 @@ def smiles_to_atoms(smiles):
|
|
| 23 |
return ase_atoms
|
| 24 |
|
| 25 |
class POSEGNN():
|
| 26 |
-
def __init__(self,
|
|
|
|
| 27 |
self.device = device
|
| 28 |
self.calculator = None
|
| 29 |
|
|
|
|
| 23 |
return ase_atoms
|
| 24 |
|
| 25 |
class POSEGNN():
|
| 26 |
+
def __init__(self, use_gpu=True):
|
| 27 |
+
device = "cuda" if use_gpu and torch.cuda.is_available() else "cpu"
|
| 28 |
self.device = device
|
| 29 |
self.calculator = None
|
| 30 |
|
requirements.txt
CHANGED
|
@@ -28,4 +28,4 @@ tqdm>=4.66.4
|
|
| 28 |
pandas==2.2.3
|
| 29 |
mordred
|
| 30 |
ase==3.24.0
|
| 31 |
-
torch_nl==0.3
|
|
|
|
| 28 |
pandas==2.2.3
|
| 29 |
mordred
|
| 30 |
ase==3.24.0
|
| 31 |
+
torch_nl==0.3
|