hadadrjt commited on
Commit
8552887
·
1 Parent(s): 188764d

ai: Use new Docker image.

Browse files

[i] Greater stability for AI usage

Files changed (2) hide show
  1. Dockerfile +5 -6
  2. requirements.txt +1 -10
Dockerfile CHANGED
@@ -3,9 +3,9 @@
3
  # SPDX-License-Identifier: Apache-2.0
4
  #
5
 
6
- # Use the latest version of Ubuntu image from the specified
7
  # Docker Hub repository, as the base image for this container.
8
- FROM hadadrjt/ubuntu:latest
9
 
10
  # Set the working directory inside the container to /usr/src/app.
11
  # All subsequent instructions will operate from this path.
@@ -16,15 +16,14 @@ WORKDIR /usr/src/app
16
  COPY . .
17
 
18
  # Install all Python dependencies listed in requirements.txt.
19
- # The --no-cache-dir flag ensures that pip does not store the
20
- # downloaded packages, reducing image size.
21
- RUN pip install --no-cache-dir -r requirements.txt
22
 
23
  # Create a new user named 'app' for running the
24
  # application in production.
25
  # Change ownership and permissions of the application directory.
26
  # Lock the root account and restrict shell access.
27
- RUN useradd -m app \
 
28
  && chown -R app:app /usr/src/app \
29
  && chmod -R u+rwX /usr/src/app \
30
  && passwd -l root \
 
3
  # SPDX-License-Identifier: Apache-2.0
4
  #
5
 
6
+ # Use the latest version of AI image from the specified
7
  # Docker Hub repository, as the base image for this container.
8
+ FROM hadadrjt/ai:latest
9
 
10
  # Set the working directory inside the container to /usr/src/app.
11
  # All subsequent instructions will operate from this path.
 
16
  COPY . .
17
 
18
  # Install all Python dependencies listed in requirements.txt.
19
+ RUN pip install -r requirements.txt
 
 
20
 
21
  # Create a new user named 'app' for running the
22
  # application in production.
23
  # Change ownership and permissions of the application directory.
24
  # Lock the root account and restrict shell access.
25
+ RUN groupadd -g 1000 app \
26
+ && useradd -m -s /bin/bash -u 1000 -g 1000 app \
27
  && chown -R app:app /usr/src/app \
28
  && chmod -R u+rwX /usr/src/app \
29
  && passwd -l root \
requirements.txt CHANGED
@@ -1,10 +1 @@
1
- aiohttp[speedups]
2
- anyio
3
- gradio==5.34.2
4
- httpx
5
- httpx[http2]
6
- pydantic
7
- Pygments
8
- starlette
9
- urllib3
10
- uvicorn
 
1
+ gradio==5.34.2