Lyon28 commited on
Commit
cb7ed97
·
verified ·
1 Parent(s): 05d5aef

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ git \
8
+ curl \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Install Python dependencies
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Copy application files
16
+ COPY . .
17
+
18
+ # Expose port
19
+ EXPOSE 7860
20
+
21
+ # Set environment variables
22
+ ENV PYTHONPATH=/app
23
+ ENV TRANSFORMERS_CACHE=/app/cache
24
+ ENV HF_HOME=/app/cache
25
+
26
+ # Create cache directory
27
+ RUN mkdir -p /app/cache
28
+
29
+ # Run the application
30
+ CMD ["python", "app.py"]