basaktamer commited on
Commit
a488ec7
·
verified ·
1 Parent(s): 85d60bd

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.10-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /code
6
+
7
+ # Install system dependencies (needed for OpenCV/plotting)
8
+ RUN apt-get update && apt-get install -y \
9
+ build-essential \
10
+ libgl1-mesa-glx \
11
+ libglib2.0-0 \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Copy requirements first to leverage Docker cache
15
+ COPY requirements.txt .
16
+ RUN pip install --no-cache-dir -r requirements.txt
17
+
18
+ # Copy the rest of your application code
19
+ COPY . .
20
+
21
+ # Set the port for Streamlit (Hugging Face uses 7860 by default)
22
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]