Slovand commited on
Commit
266bf04
·
verified ·
1 Parent(s): e66c95a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -18
Dockerfile CHANGED
@@ -1,37 +1,20 @@
1
- # Dockerfile - Untuk Hugging Face Spaces
2
-
3
  FROM python:3.10-slim
4
 
5
- # Set working directory
6
  WORKDIR /app
7
 
8
- # Install system dependencies
9
  RUN apt-get update && apt-get install -y \
10
  gcc \
11
  g++ \
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 all files
21
  COPY . .
22
 
23
- # Download NLTK data
24
- RUN python -c "import nltk; nltk.download('punkt'); nltk.download('stopwords')"
25
-
26
- # Create necessary directories
27
- RUN mkdir -p uploads data/processed models
28
-
29
- # Set environment variables
30
  ENV FLASK_ENV=production
31
  ENV PORT=7860
32
 
33
- # Expose port
34
  EXPOSE 7860
35
 
36
- # Run the app
37
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app_full:app"]
 
 
 
1
  FROM python:3.10-slim
2
 
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  gcc \
7
  g++ \
8
  && rm -rf /var/lib/apt/lists/*
9
 
 
10
  COPY requirements.txt .
 
 
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
 
13
  COPY . .
14
 
 
 
 
 
 
 
 
15
  ENV FLASK_ENV=production
16
  ENV PORT=7860
17
 
 
18
  EXPOSE 7860
19
 
20
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]