0504ankitsharma commited on
Commit
c9ff3dd
·
verified ·
1 Parent(s): b01feb9

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -10
Dockerfile CHANGED
@@ -3,33 +3,33 @@ FROM python:3.9
3
 
4
  # Install curl
5
  RUN apt-get update && apt-get install -y curl
 
6
 
7
  # # Create a new user with a home directory and set the user ID
8
- # RUN useradd -m -u 1000 user
9
 
10
  # # Switch to the new user
11
- # USER user
12
 
13
  # # Set the PATH environment variable to include the user's local bin directory
14
- # ENV PATH="/home/user/.local/bin:$PATH"
15
 
16
  # # Set the working directory to /app
17
- # WORKDIR /app
18
 
19
  # # Copy the requirements.txt file and install the dependencies
20
- # COPY --chown=user ./requirements.txt requirements.txt
21
- # RUN pip install --no-cache-dir --upgrade -r requirements.txt
22
 
23
  # # Copy the rest of the application code to the /app directory
24
- # COPY --chown=user . /app
25
 
26
  # Install Ollama
27
- RUN curl -fsSL https://ollama.com/install.sh | sh
28
 
29
  # Create the directory and give appropriate permissions
30
- RUN mkdir -p /.app && chmod 777 /.app
31
 
32
- WORKDIR /.app
33
 
34
  # Copy the entry point script
35
  COPY entry.sh /entry.sh
 
3
 
4
  # Install curl
5
  RUN apt-get update && apt-get install -y curl
6
+ RUN curl -fsSL https://ollama.com/install.sh | sh
7
 
8
  # # Create a new user with a home directory and set the user ID
9
+ RUN useradd -m -u 1000 user
10
 
11
  # # Switch to the new user
12
+ USER user
13
 
14
  # # Set the PATH environment variable to include the user's local bin directory
15
+ ENV PATH="/home/user/.local/bin:$PATH"
16
 
17
  # # Set the working directory to /app
18
+ WORKDIR /app
19
 
20
  # # Copy the requirements.txt file and install the dependencies
21
+ COPY --chown=user ./requirements.txt requirements.txt
22
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
23
 
24
  # # Copy the rest of the application code to the /app directory
25
+ COPY --chown=user . /app
26
 
27
  # Install Ollama
 
28
 
29
  # Create the directory and give appropriate permissions
30
+ # RUN mkdir -p /.app && chmod 777 /.app
31
 
32
+ # WORKDIR /.app
33
 
34
  # Copy the entry point script
35
  COPY entry.sh /entry.sh