Shravan2020 commited on
Commit
7271d37
·
verified ·
1 Parent(s): 819bda7

Upload Dockerfile.txt

Browse files
Files changed (1) hide show
  1. Dockerfile.txt +24 -0
Dockerfile.txt ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # Hugging Face Spaces compatibility
4
+ ENV HOME=/home/user
5
+ ENV PATH=/home/user/.local/bin:$PATH
6
+ WORKDIR /app
7
+
8
+ RUN apt-get update && apt-get install -y --no-install-recommends \
9
+ curl \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ COPY acea/requirements.txt ./requirements.txt
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ COPY acea/ .
16
+
17
+ RUN touch backend/__init__.py env/__init__.py
18
+
19
+ EXPOSE 7860
20
+
21
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
22
+ CMD curl -f http://localhost:7860/health || exit 1
23
+
24
+ CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]