NavyDevilDoc commited on
Commit
fd2d4ca
·
verified ·
1 Parent(s): d98461f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a slim Python image to keep the container small and fast
2
+ FROM python:3.10-slim
3
+
4
+ # Set the working directory
5
+ WORKDIR /app
6
+
7
+ # Copy the requirements file into the container
8
+ COPY requirements.txt .
9
+
10
+ # Install dependencies
11
+ # We include build-essential for compiling some C extensions if needed
12
+ RUN apt-get update && apt-get install -y \
13
+ build-essential \
14
+ && rm -rf /var/lib/apt/lists/* \
15
+ && pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Copy the rest of the application code
18
+ COPY . .
19
+
20
+ # Expose the port that Hugging Face Spaces expects (7860)
21
+ EXPOSE 7860
22
+
23
+ # Run Streamlit
24
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]