TorchLLM commited on
Commit
03319db
·
verified ·
1 Parent(s): 62c4be4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -23
Dockerfile CHANGED
@@ -1,38 +1,38 @@
1
  # Use Python 3.10 as the base image
2
  FROM python:3.10-slim
3
 
4
- # Set the working directory
5
  WORKDIR /app/src
6
 
7
- # Debug: List directory structure before copying
8
  RUN ls -R /
9
 
10
- # Run the script
11
- CMD ["./start.sh"]
12
 
13
- # # Copy the `requirements.txt` file
14
- # COPY ./src/requirements.txt ./requirements.txt
15
 
16
- # # Debug: Confirm `requirements.txt` is copied
17
- # RUN ls -R /app/src
18
 
19
- # # Install Python dependencies
20
- # RUN pip install --no-cache-dir -r requirements.txt
21
 
22
- # # Copy the entire `src` directory
23
- # COPY src /app/src
24
 
25
- # # Expose necessary ports
26
- # EXPOSE 8000 8501
27
 
28
- # # Create a script to run both apps
29
- # RUN echo '#!/bin/bash\n\
30
- # python response_api.py &\n\
31
- # sleep 5\n\
32
- # streamlit run app.py' > ./start.sh
33
 
34
- # # Make the script executable
35
- # RUN chmod +x ./start.sh
36
 
37
- # # Run the script
38
- # CMD ["./start.sh"]
 
1
  # Use Python 3.10 as the base image
2
  FROM python:3.10-slim
3
 
4
+ # Set the working directory in the container
5
  WORKDIR /app/src
6
 
7
+ # Debug: List all files in the root directory of the build context
8
  RUN ls -R /
9
 
10
+ # Copy the `requirements.txt` file from the `src` directory
11
+ COPY src/requirements.txt /app/src/requirements.txt
12
 
13
+ # Debug: List contents of `/app/src` after copying requirements.txt
14
+ RUN ls -R /app/src
15
 
16
+ # Install Python dependencies
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
 
19
+ # Copy the entire `src` directory to the container
20
+ COPY src /app/src
21
 
22
+ # Debug: Confirm the contents of `/app/src` after copying all files
23
+ RUN ls -R /app/src
24
 
25
+ # Expose necessary ports
26
+ EXPOSE 8000 8501
27
 
28
+ # Create a script to run both the FastAPI and Streamlit apps
29
+ RUN echo '#!/bin/bash\n\
30
+ python response_api.py &\n\
31
+ sleep 5\n\
32
+ streamlit run app.py' > ./start.sh
33
 
34
+ # Make the script executable
35
+ RUN chmod +x ./start.sh
36
 
37
+ # Run the script
38
+ CMD ["./start.sh"]