bobbypaton commited on
Commit
8d4310f
·
1 Parent(s): 19af606

Deploy ALFABET to HF Spaces

Browse files
Files changed (2) hide show
  1. Dockerfile +10 -8
  2. requirements.txt +12 -0
Dockerfile CHANGED
@@ -1,19 +1,21 @@
1
- FROM continuumio/miniconda3
2
 
3
- # Install dependencies as root first
4
- COPY etc/environment.yml /tmp/environment.yml
5
- RUN conda env update -f /tmp/environment.yml && \
6
- conda clean --all --yes && \
7
- rm /tmp/environment.yml
8
 
9
- # Now create and switch to non-root user (HF Spaces requirement)
10
  RUN useradd -m -u 1000 user
11
  USER user
12
  ENV HOME=/home/user \
13
- PATH=/home/user/.local/bin:/opt/conda/bin:$PATH \
14
  PORT=7860
15
 
16
  WORKDIR $HOME/app
 
 
 
17
  COPY --chown=user bde_prediction .
18
 
19
  ENV PYTHONPATH "${PYTHONPATH}:$HOME/app"
 
1
+ FROM python:3.9-slim
2
 
3
+ # Install system dependencies needed by RDKit
4
+ RUN apt-get update && apt-get install -y \
5
+ libxrender1 \
6
+ libxext6 \
7
+ && rm -rf /var/lib/apt/lists/*
8
 
 
9
  RUN useradd -m -u 1000 user
10
  USER user
11
  ENV HOME=/home/user \
12
+ PATH=/home/user/.local/bin:$PATH \
13
  PORT=7860
14
 
15
  WORKDIR $HOME/app
16
+ COPY --chown=user requirements.txt .
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
  COPY --chown=user bde_prediction .
20
 
21
  ENV PYTHONPATH "${PYTHONPATH}:$HOME/app"
requirements.txt ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ flask
2
+ gunicorn
3
+ pandas
4
+ rdkit
5
+ scikit-learn==0.24.2
6
+ numpy
7
+ wtforms
8
+ httpx
9
+ joblib
10
+ pytest
11
+ tensorflow==2.9.1
12
+ alfabet==0.2.2