triflix commited on
Commit
db07b66
·
verified ·
1 Parent(s): fd32157

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -16
Dockerfile CHANGED
@@ -1,25 +1,16 @@
1
- # Dockerfile for running the FastAPI signaling server on port 7860
2
  FROM python:3.11-slim
3
 
4
- ENV PYTHONDONTWRITEBYTECODE=1
5
- ENV PYTHONUNBUFFERED=1
6
 
7
  WORKDIR /app
8
 
9
- # Install system deps for uvicorn and cryptography if needed
10
- RUN apt-get update && apt-get install -y --no-install-recommends \
11
- build-essential \
12
- && rm -rf /var/lib/apt/lists/*
13
 
14
- # Copy project files
15
- COPY . /app
16
 
17
- # Install python deps
18
- # pip packages: fastapi (ASGI), uvicorn for server, passlib[bcrypt] for password hashing
19
- RUN pip install --no-cache-dir "fastapi" "uvicorn[standard]" "passlib[bcrypt]"
20
-
21
- # Expose port 7860 (Hugging Face Spaces expects this)
22
  EXPOSE 7860
23
 
24
- # Run uvicorn on port 7860
25
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--loop", "asyncio"]
 
 
1
  FROM python:3.11-slim
2
 
3
+ # Install system dependencies needed for Jinja2
4
+ RUN apt-get update && apt-get install -y build-essential libffi-dev libssl-dev && rm -rf /var/lib/apt/lists/*
5
 
6
  WORKDIR /app
7
 
8
+ COPY requirements.txt .
9
+ RUN pip install --upgrade pip
10
+ RUN pip install --no-cache-dir -r requirements.txt
 
11
 
12
+ COPY . .
 
13
 
 
 
 
 
 
14
  EXPOSE 7860
15
 
16
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]