cloud450 commited on
Commit
827834c
·
verified ·
1 Parent(s): f3ad110

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -0
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.10 slim image
2
+ FROM python:3.10-slim
3
+
4
+ # Set environment variables
5
+ ENV PYTHONDONTWRITEBYTECODE=1 \
6
+ PYTHONUNBUFFERED=1 \
7
+ DEBIAN_FRONTEND=noninteractive
8
+
9
+ # Install system dependencies
10
+ # tshark is required for pyshark
11
+ RUN apt-get update && apt-get install -y \
12
+ tshark \
13
+ git \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Set working directory
17
+ WORKDIR /app
18
+
19
+ # Copy requirements file
20
+ COPY requirements.txt .
21
+
22
+ # Install Python dependencies
23
+ RUN pip install --no-cache-dir -r requirements.txt
24
+
25
+ # Copy the rest of the application
26
+ COPY . .
27
+
28
+ # Ensure data directory exists (user should populate this with models/data)
29
+ RUN mkdir -p data
30
+
31
+ # Expose the port Hugging Face Spaces expects (7860)
32
+ EXPOSE 7860
33
+
34
+ # Command to run the application
35
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]