TorchLLM commited on
Commit
d76057f
·
verified ·
1 Parent(s): 9538443

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -7
Dockerfile CHANGED
@@ -4,19 +4,22 @@ FROM python:3.10-slim
4
  # Set the working directory in the container
5
  WORKDIR /app/src
6
 
7
- # Copy requirements.txt first (if it exists in the root directory)
8
- COPY ./src/requirements.txt ./src/requirements.txt
 
 
 
9
 
10
  # Install Python dependencies
11
- RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Copy the source code
14
  COPY . .
15
 
16
- # Expose ports for the FastAPI and Streamlit apps
17
  EXPOSE 8000 8501
18
 
19
- # Create a script to run both the FastAPI and Streamlit apps
20
  RUN echo '#!/bin/bash\n\
21
  python response_api.py &\n\
22
  sleep 5\n\
@@ -26,4 +29,4 @@ streamlit run app.py' > ./start.sh
26
  RUN chmod +x ./start.sh
27
 
28
  # Run the startup script
29
- CMD ["./start.sh"]
 
4
  # Set the working directory in the container
5
  WORKDIR /app/src
6
 
7
+ # Debug: Print the current working directory and list the files
8
+ RUN echo "Debugging the source directory during build context:" && pwd && ls -R /
9
+
10
+ # Copy requirements.txt from the source directory to /app/src
11
+ COPY ./src/requirements.txt /app/src/requirements.txt
12
 
13
  # Install Python dependencies
14
+ RUN pip install --no-cache-dir -r /app/src/requirements.txt
15
 
16
+ # Copy the source code to the container
17
  COPY . .
18
 
19
+ # Expose ports for FastAPI and Streamlit apps
20
  EXPOSE 8000 8501
21
 
22
+ # Create a script to run both FastAPI and Streamlit apps
23
  RUN echo '#!/bin/bash\n\
24
  python response_api.py &\n\
25
  sleep 5\n\
 
29
  RUN chmod +x ./start.sh
30
 
31
  # Run the startup script
32
+ CMD ["./start.sh"]