Dinesh4311 commited on
Commit
bb37ddd
·
verified ·
1 Parent(s): dddc847

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +37 -0
Dockerfile ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Plant DNA Designer — container image for the FastAPI web app.
2
+ # Doubles as the Hugging Face Space image (sdk: docker, app_port: 7860).
3
+ #
4
+ # docker build -t plant-dna-designer .
5
+ # docker run -p 7860:7860 plant-dna-designer # open http://localhost:7860
6
+ #
7
+ FROM python:3.12-slim
8
+
9
+ ENV PIP_NO_CACHE_DIR=1 \
10
+ PYTHONUNBUFFERED=1 \
11
+ PYTHONDONTWRITEBYTECODE=1
12
+
13
+ WORKDIR /app
14
+
15
+ # Core runtime dependencies (must install cleanly; all ship manylinux wheels for
16
+ # cp312, so no compiler is needed). matplotlib/pytest/httpx from requirements.txt
17
+ # are build/test-only and are intentionally excluded from the runtime image.
18
+ RUN pip install \
19
+ "fastapi>=0.139.0" \
20
+ "uvicorn[standard]>=0.50.2" \
21
+ "jinja2>=3.1.6" \
22
+ "pydantic>=2.13.4" \
23
+ "biopython>=1.87" \
24
+ "numpy>=2.5.0"
25
+
26
+ # Optional: ViennaRNA gives exact MFE / partition-function folding. The app falls
27
+ # back to a built-in Nussinov estimator when it is absent, so a failure here must
28
+ # NOT break the image — hence the guard.
29
+ RUN pip install "ViennaRNA>=2.7.2" \
30
+ || echo "ViennaRNA unavailable; falling back to the built-in Nussinov fold."
31
+
32
+ # Application code (pure-Python core, API, and no-build web frontend).
33
+ COPY cool/ ./cool/
34
+
35
+ WORKDIR /app/cool
36
+ EXPOSE 7860
37
+ CMD ["python", "-m", "uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "7860"]