-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (36 loc) · 1.17 KB
/
Dockerfile
File metadata and controls
47 lines (36 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM continuumio/miniconda3:latest
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV PATH="/usr/local/bin:$PATH"
# -----------------------------
# System dependencies
# -----------------------------
RUN apt-get update && apt-get install -y \
build-essential \
wget \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# -----------------------------
# Build Nauty manually (geng etc.)
# -----------------------------
WORKDIR /tmp
RUN wget https://pallini.di.uniroma1.it/nauty27r1.tar.gz \
&& tar -xzf nauty27r1.tar.gz \
&& cd nauty27r1 \
&& make -j$(nproc) \
&& cp geng shortg dretodot labelg /usr/local/bin/ \
&& chmod +x /usr/local/bin/geng /usr/local/bin/shortg /usr/local/bin/dretodot /usr/local/bin/labelg
# Verify geng works
RUN /usr/local/bin/geng 1 || true
RUN conda install -c conda-forge rdkit python=3.10 -y && conda clean -afy
# -----------------------------
# Python + app setup
# -----------------------------
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Ensure static directory exists for saving PNGs
RUN mkdir -p /app/static
EXPOSE 7860
CMD ["python", "backend.py"]