TorchLLM commited on
Commit
91cc88d
·
verified ·
1 Parent(s): a96daa5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -10
Dockerfile CHANGED
@@ -1,28 +1,28 @@
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
- # Debugging: List files in build context
8
  RUN ls -R /
9
 
10
- # Copy the `requirements.txt` file from `src` directory
11
- COPY ./src/requirements.txt /app/src/requirements.txt
12
 
13
- # Debugging: Confirm `requirements.txt` is copied
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
- # Expose ports for FastAPI and Streamlit
23
  EXPOSE 8000 8501
24
 
25
- # Create a script to run both the FastAPI and Streamlit apps
26
  RUN echo '#!/bin/bash\n\
27
  python response_api.py &\n\
28
  sleep 5\n\
@@ -31,5 +31,5 @@ streamlit run app.py' > ./start.sh
31
  # Make the script executable
32
  RUN chmod +x ./start.sh
33
 
34
- # Run the startup script
35
  CMD ["./start.sh"]
 
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
+ # Copy the `requirements.txt` file
11
+ COPY src/requirements.txt /app/src/requirements.txt
12
 
13
+ # Debug: Confirm `requirements.txt` is copied
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
20
+ COPY src /app/src
21
 
22
+ # Expose necessary ports
23
  EXPOSE 8000 8501
24
 
25
+ # Create a script to run both apps
26
  RUN echo '#!/bin/bash\n\
27
  python response_api.py &\n\
28
  sleep 5\n\
 
31
  # Make the script executable
32
  RUN chmod +x ./start.sh
33
 
34
+ # Run the script
35
  CMD ["./start.sh"]