devilseye2004 commited on
Commit
9cd1daf
·
verified ·
1 Parent(s): bdd6496

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -31
Dockerfile CHANGED
@@ -1,31 +1,31 @@
1
- # Production Dockerfile for Hugging Face Spaces
2
- # CPU-optimized T5 Paraphrasing API
3
-
4
- FROM python:3.10-slim
5
-
6
- # Set working directory
7
- WORKDIR /app
8
-
9
- # Install system dependencies (minimal)
10
- RUN apt-get update && apt-get install -y --no-install-recommends \
11
- build-essential \
12
- && rm -rf /var/lib/apt/lists/*
13
-
14
- # Copy requirements first for better caching
15
- COPY requirements.txt .
16
-
17
- # Install Python dependencies
18
- RUN pip install --no-cache-dir -r requirements.txt
19
-
20
- # Copy application code
21
- COPY app.py .
22
-
23
- # Expose port 7860 (Hugging Face Spaces default)
24
- EXPOSE 7860
25
-
26
- # Set environment variables
27
- ENV PORT=7860
28
- ENV PYTHONUNBUFFERED=1
29
-
30
- # Run the application
31
- CMD ["python", "app.py"]
 
1
+ # Production Dockerfile for Hugging Face Spaces
2
+ # CPU-optimized T5 Paraphrasing API
3
+
4
+ FROM python:3.10-slim
5
+
6
+ # Set working directory
7
+ WORKDIR /app
8
+
9
+ # Install system dependencies (minimal)
10
+ RUN apt-get update && apt-get install -y --no-install-recommends \
11
+ build-essential \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Copy requirements first for better caching
15
+ COPY requirements.txt .
16
+
17
+ # Install Python dependencies
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Copy application code
21
+ COPY app.py .
22
+
23
+ # Expose port 7860 (Hugging Face Spaces default)
24
+ EXPOSE 7860
25
+
26
+ # Set environment variables
27
+ ENV PORT=7860
28
+ ENV PYTHONUNBUFFERED=1
29
+
30
+ # Run the application
31
+ CMD ["python", "app.py"]