sigyllly commited on
Commit
7ca2966
·
verified ·
1 Parent(s): 9562d52

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y \
11
  && wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
12
  && dpkg -i packages-microsoft-prod.deb \
13
  && apt-get update && apt-get install -y dotnet-sdk-7.0 \
14
- && apt-get install -y python3-pip \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
  # Create uploads directory and set permissions
@@ -29,8 +29,11 @@ COPY . .
29
  # Expose the port the app runs on
30
  EXPOSE 7860
31
 
32
- # Set the PATH for the .NET tools
33
- ENV PATH="${PATH}:/usr/bin/dotnet"
 
 
 
34
 
35
  # Command to run the Flask app
36
  CMD ["python3", "main.py"]
 
11
  && wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
12
  && dpkg -i packages-microsoft-prod.deb \
13
  && apt-get update && apt-get install -y dotnet-sdk-7.0 \
14
+ python3-pip \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
  # Create uploads directory and set permissions
 
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"]