Efradeca commited on
Commit
ac829d2
·
verified ·
1 Parent(s): fc7d689

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # System deps
6
+ RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
7
+
8
+ # Python deps (install before copying code for caching)
9
+ COPY web/requirements.txt /app/requirements.txt
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ # Copy source and install package
13
+ COPY pyproject.toml /app/pyproject.toml
14
+ COPY src/ /app/src/
15
+ RUN touch /app/README.md && pip install --no-cache-dir .
16
+
17
+ # Copy only what the web app needs
18
+ COPY scripts/bezier.yml /app/scripts/bezier.yml
19
+ COPY scripts/shapes.py /app/scripts/shapes.py
20
+ COPY data/formfinder_bezier.eqx /app/data/formfinder_bezier.eqx
21
+ COPY web/ /app/web/
22
+
23
+ ENV PYTHONPATH=/app/src:/app
24
+ ENV JAX_PLATFORMS=cpu
25
+
26
+ EXPOSE 7860
27
+
28
+ CMD ["python", "-m", "uvicorn", "web.app:app", "--host", "0.0.0.0", "--port", "7860"]