Update Dockerfile
Browse files- 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
|
| 5 |
WORKDIR /app/src
|
| 6 |
|
| 7 |
-
#
|
| 8 |
RUN ls -R /
|
| 9 |
|
| 10 |
-
# Copy the `requirements.txt` file
|
| 11 |
-
COPY
|
| 12 |
|
| 13 |
-
#
|
| 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
|
| 21 |
|
| 22 |
-
# Expose
|
| 23 |
EXPOSE 8000 8501
|
| 24 |
|
| 25 |
-
# Create a script to run both
|
| 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
|
| 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"]
|