JackyZzZzZ commited on
Commit
f1fdaf3
·
1 Parent(s): cbd6355

Changed strategy to setup

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -5
Dockerfile CHANGED
@@ -4,19 +4,28 @@ FROM python:3.11-slim
4
  # Set the working directory in the container
5
  WORKDIR /app
6
 
 
 
 
 
 
7
  # Copy the requirements file into the container
8
  COPY requirements.txt requirements.txt
9
  COPY requirements_dev.txt requirements_dev.txt
10
 
11
- # Install the dependencies
12
- RUN pip install --no-cache-dir -r requirements.txt
13
- RUN pip install --no-cache-dir -r requirements_dev.txt
 
 
 
 
14
 
15
  # Copy the rest of the application code
16
  COPY . .
17
 
18
- # Install the Selector package
19
- RUN python setup.py install
20
 
21
  # Expose the port the app runs on
22
  EXPOSE 8501
 
4
  # Set the working directory in the container
5
  WORKDIR /app
6
 
7
+ # Install system dependencies required for building packages
8
+ RUN apt-get update && \
9
+ apt-get install -y build-essential && \
10
+ apt-get clean
11
+
12
  # Copy the requirements file into the container
13
  COPY requirements.txt requirements.txt
14
  COPY requirements_dev.txt requirements_dev.txt
15
 
16
+ # Upgrade pip, setuptools, and wheel
17
+ RUN pip install --upgrade pip setuptools wheel
18
+
19
+ # Install the dependencies using --use-pep517
20
+ RUN pip install --use-pep517 --no-cache-dir -r requirements.txt
21
+ RUN pip install --use-pep517 --no-cache-dir -r requirements_dev.txt
22
+ RUN pip install --use-pep517 --no-cache-dir streamlit
23
 
24
  # Copy the rest of the application code
25
  COPY . .
26
 
27
+ # Install the Selector package using PEP 517 standards-based tools
28
+ RUN pip install --use-pep517 .
29
 
30
  # Expose the port the app runs on
31
  EXPOSE 8501