Neurolingua commited on
Commit
a0c9380
1 Parent(s): ea99c1e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +0 -36
Dockerfile CHANGED
@@ -1,54 +1,18 @@
1
  # Use Python 3.9 slim image as the base
2
  FROM python:3.9-slim
3
 
4
- # Install necessary system dependencies
5
- RUN apt-get update && apt-get install -y \
6
- libgl1-mesa-glx \
7
- libglib2.0-0 \
8
- wget \
9
- unzip \
10
- curl \
11
- ca-certificates \
12
- gnupg \
13
- fonts-liberation \
14
- libnss3 \
15
- libxss1 \
16
- libappindicator1 \
17
- libgbm-dev \
18
- libgtk-3-0 \
19
- gcc \
20
- libffi-dev \
21
- libxml2-dev \
22
- libxslt1-dev \
23
- libjpeg-dev \
24
- zlib1g-dev \
25
- && rm -rf /var/lib/apt/lists/*
26
 
27
  # Set the working directory
28
  WORKDIR /code
29
 
30
- # Create necessary directories
31
- RUN mkdir -p /code/uploads /code/chroma_db
32
 
33
- # Add and use a non-root user
34
- RUN useradd -ms /bin/sh myuser
35
-
36
- # Set ownership and permissions
37
- RUN chown -R myuser:myuser /code && \
38
- chmod -R 755 /code/chroma_db && \
39
- chmod -R 775 /code/uploads
40
-
41
- RUN apt-get update && apt-get install -y tesseract-ocr
42
 
43
  # Switch to non-root user
44
  USER myuser
45
 
46
  # Copy and install Python dependencies
47
- COPY --chown=myuser:myuser ./requirements.txt /code/requirements.txt
48
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
49
 
50
- # Copy the application code
51
- COPY --chown=myuser:myuser . /code
52
 
53
  # Default command to run the application
54
  CMD ["python", "app.py"]
 
1
  # Use Python 3.9 slim image as the base
2
  FROM python:3.9-slim
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  # Set the working directory
6
  WORKDIR /code
7
 
 
 
8
 
 
 
 
 
 
 
 
 
 
9
 
10
  # Switch to non-root user
11
  USER myuser
12
 
13
  # Copy and install Python dependencies
 
14
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
15
 
 
 
16
 
17
  # Default command to run the application
18
  CMD ["python", "app.py"]