sahanes commited on
Commit
435ecfc
·
verified ·
1 Parent(s): 437589c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -10
Dockerfile CHANGED
@@ -1,11 +1,28 @@
1
- FROM python:3.10
2
- RUN useradd -m -u 1000 user
3
- USER user
4
- ENV HOME=/home/user \
5
- PATH=/home/user/.local/bin:$PATH
6
- WORKDIR $HOME/app
7
- COPY --chown=user . $HOME/app
8
- COPY ./requirements.txt ~/app/requirements.txt
9
- RUN pip install -r requirements.txt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  COPY . .
11
- CMD ["chainlit", "run", "app.py", "--port", "7860"]
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Install system dependencies
4
+ RUN apt-get update && \
5
+ apt-get install -y build-essential && \
6
+ apt-get install -y python3-dev && \
7
+ apt-get install -y libatlas-base-dev
8
+
9
+ # Upgrade pip and setuptools
10
+ RUN pip install --upgrade pip setuptools
11
+
12
+ # Install Cython and NumPy
13
+ RUN pip install cython
14
+ RUN pip install numpy
15
+
16
+ # Copy and install the requirements file
17
+ COPY requirements.txt /app/requirements.txt
18
+ RUN pip install -r /app/requirements.txt
19
+
20
+ # Set the working directory
21
+ WORKDIR /app
22
+
23
+ # Copy the application code
24
  COPY . .
25
+
26
+ # Command to run your application
27
+ CMD ["python", "app.py"]
28
+