mfoud444 commited on
Commit
a37cebd
·
verified ·
1 Parent(s): 1c87021

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -43
Dockerfile CHANGED
@@ -1,47 +1,10 @@
1
- # Use Python 3.9 as base image
2
- FROM python:3.9-slim
3
 
4
- # Set working directory
5
- WORKDIR /app
6
 
7
- # Create a non-root user
8
- RUN useradd -m -u 1000 user && \
9
- chown -R user:user /app
10
 
11
- # Set environment variables
12
- ENV PYTHONUNBUFFERED=1 \
13
- TRANSFORMERS_CACHE=/app/cache \
14
- MPLCONFIGDIR=/app/matplotlib \
15
- HOME=/app
16
 
17
- # Copy requirements first to leverage Docker cache
18
- COPY requirements.txt .
19
-
20
- # Install dependencies and download required NLTK data
21
- RUN pip install --no-cache-dir -r requirements.txt && \
22
- python -m textblob.download_corpora && \
23
- python -c "import nltk; nltk.download('punkt'); nltk.download('averaged_perceptron_tagger'); nltk.download('wordnet')"
24
-
25
- # Install additional system dependencies for sentence-transformers
26
- RUN apt-get update && apt-get install -y \
27
- build-essential \
28
- && rm -rf /var/lib/apt/lists/*
29
-
30
- # Copy the rest of the application
31
- COPY . .
32
-
33
- # Create necessary directories and set permissions
34
- RUN mkdir -p /app/cache /app/matplotlib && \
35
- chown -R user:user /app
36
-
37
- # Switch to non-root user
38
- USER user
39
-
40
- # Expose port 7860 for Gradio
41
- EXPOSE 7860
42
-
43
- # Set environment variables
44
- ENV GRADIO_SERVER_NAME=0.0.0.0
45
-
46
- # Command to run the application
47
- CMD ["python", "app.py"]
 
1
+ FROM ubuntu:22.04
 
2
 
3
+ ENV DEBIAN_FRONTEND=noninteractive
 
4
 
5
+ RUN apt-get update && apt-get install -y curl && \
6
+ curl -sSL https://dokploy.com/install.sh | sh
 
7
 
8
+ EXPOSE 3000
 
 
 
 
9
 
10
+ CMD ["bash"]