sigyllly commited on
Commit
63be5ca
·
verified ·
1 Parent(s): 7ca2966

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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 | xargs dirname) && \
34
- echo "Found csc at: $CSC_PATH" && \
35
- export PATH=$CSC_PATH:$PATH && \
36
- echo "Updated PATH: $PATH"
 
 
 
 
 
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"]