Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -5
Dockerfile
CHANGED
@@ -29,11 +29,16 @@ COPY . .
|
|
29 |
# Expose the port the app runs on
|
30 |
EXPOSE 7860
|
31 |
|
32 |
-
# Automatically find the csc location and update the PATH
|
33 |
-
RUN CSC_PATH=$(find / -name csc 2>/dev/null | head -n 1
|
34 |
-
|
35 |
-
|
36 |
-
echo "
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
# Command to run the Flask app
|
39 |
CMD ["python3", "main.py"]
|
|
|
29 |
# Expose the port the app runs on
|
30 |
EXPOSE 7860
|
31 |
|
32 |
+
# Automatically find the csc location and update the PATH, if found
|
33 |
+
RUN CSC_PATH=$(find / -name csc 2>/dev/null | head -n 1) && \
|
34 |
+
if [ -n "$CSC_PATH" ]; then \
|
35 |
+
CSC_DIR=$(dirname $CSC_PATH); \
|
36 |
+
echo "Found csc at: $CSC_PATH"; \
|
37 |
+
export PATH=$CSC_DIR:$PATH; \
|
38 |
+
echo "Updated PATH: $PATH"; \
|
39 |
+
else \
|
40 |
+
echo "csc not found!"; \
|
41 |
+
fi
|
42 |
|
43 |
# Command to run the Flask app
|
44 |
CMD ["python3", "main.py"]
|