shubham5524 commited on
Commit
d2ccb99
·
verified ·
1 Parent(s): 3fc0271

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -11
Dockerfile CHANGED
@@ -4,23 +4,16 @@ FROM python:3.10-slim
4
  # Set working directory
5
  WORKDIR /app
6
 
 
 
 
7
  # Copy files
8
  COPY . /app
9
 
10
- # Install dependencies
11
  RUN pip install --upgrade pip && pip install -r requirements.txt
12
 
13
  # Create writable cache/config directories
14
  RUN mkdir -p /app/cache/matplotlib && \
15
  mkdir -p /app/cache/torchxrayvision && \
16
  chmod -R 777 /app/cache
17
-
18
- # Set environment variables for cache directories
19
- ENV MPLCONFIGDIR=/app/cache/matplotlib
20
- ENV TORCHXRAYVISION_CACHE=/app/cache/torchxrayvision
21
-
22
- # Expose the port the app runs on
23
- EXPOSE 7860
24
-
25
- # Run the app
26
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install system dependencies (fix for libGL.so.1 error)
8
+ RUN apt-get update && apt-get install -y libgl1-mesa-glx && rm -rf /var/lib/apt/lists/*
9
+
10
  # Copy files
11
  COPY . /app
12
 
13
+ # Install Python dependencies
14
  RUN pip install --upgrade pip && pip install -r requirements.txt
15
 
16
  # Create writable cache/config directories
17
  RUN mkdir -p /app/cache/matplotlib && \
18
  mkdir -p /app/cache/torchxrayvision && \
19
  chmod -R 777 /app/cache