ruslanmv commited on
Commit
1e0b4e7
·
verified ·
1 Parent(s): a24bbc4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -12
Dockerfile CHANGED
@@ -1,15 +1,38 @@
1
- FROM python:3.10-slim-buster
2
- WORKDIR /app
3
- COPY requirements.txt requirements.txt
4
- RUN python -m venv venv
5
- ENV PATH="/app/venv/bin:$PATH"
6
- RUN apt-get update
7
- RUN apt-get install -y curl
8
- RUN apt-get install -y --no-install-recommends build-essential libffi-dev cmake libcurl4-openssl-dev &&
9
- RUN apt-get clean
10
- RUN python3 -m pip install --upgrade pip
11
- RUN pip3 install --no-cache-dir -r requirements.txt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  RUN curl -fsSL https://ollama.com/install.sh | sh
 
 
13
  COPY . .
 
 
14
  RUN chmod -R 777 translations
15
- CMD ["python3", "./run.py"]
 
 
 
1
+ FROM python:3.10-slim-buster
2
+
3
+ # Set the working directory
4
+ WORKDIR /app
5
+
6
+ # Copy requirements file
7
+ COPY requirements.txt requirements.txt
8
+
9
+ # Create a virtual environment
10
+ RUN python -m venv venv
11
+
12
+ # Set the PATH to use the virtual environment
13
+ ENV PATH="/app/venv/bin:$PATH"
14
+
15
+ # Update package list and install necessary packages in a single step
16
+ RUN apt-get update && apt-get install -y \
17
+ curl \
18
+ build-essential \
19
+ libffi-dev \
20
+ cmake \
21
+ libcurl4-openssl-dev && \
22
+ apt-get clean
23
+
24
+ # Upgrade pip and install dependencies
25
+ RUN python -m pip install --upgrade pip
26
+ RUN pip install --no-cache-dir -r requirements.txt
27
+
28
+ # Install additional software
29
  RUN curl -fsSL https://ollama.com/install.sh | sh
30
+
31
+ # Copy the entire application
32
  COPY . .
33
+
34
+ # Set proper permissions for the translations directory
35
  RUN chmod -R 777 translations
36
+
37
+ # Define the command to run the application
38
+ CMD ["python", "./run.py"]