mgbam commited on
Commit
899c9ec
·
verified ·
1 Parent(s): ce93c46

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a supported Python version
2
+ FROM python:3.10-slim
3
+
4
+ # Set environment variables
5
+ ENV PYTHONDONTWRITEBYTECODE=1
6
+ ENV PYTHONUNBUFFERED=1
7
+
8
+ # Create app directory
9
+ WORKDIR /app
10
+
11
+ # Copy dependency files first
12
+ COPY requirements.txt /app/
13
+
14
+ # Install system dependencies (optional but useful for some tools)
15
+ RUN apt-get update && apt-get install -y \
16
+ build-essential \
17
+ curl \
18
+ git \
19
+ && rm -rf /var/lib/apt/lists/*
20
+
21
+ # Install Python dependencies
22
+ RUN pip install --upgrade pip && pip install -r requirements.txt
23
+
24
+ # Copy the full app into the container
25
+ COPY . /app
26
+
27
+ # Run the Gradio app on launch
28
+ CMD ["python", "app.py"]