banao-tech commited on
Commit
aa383a1
Β·
verified Β·
1 Parent(s): b13688c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -9
Dockerfile CHANGED
@@ -1,25 +1,23 @@
1
  # Base image
2
- FROM python:3.10-slim
3
 
4
-
5
- # Install system dependencies for OpenCV
6
  RUN apt-get update && apt-get install -y \
7
  libglib2.0-0 \
8
- libsm6 \
9
- libxrender1 \
10
- libxext6 \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Set working directory
14
  WORKDIR /app
15
 
16
- # Copy files into container
17
  COPY . /app
18
 
19
  # Install Python dependencies
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
22
- # Expose the port used by the application
23
  EXPOSE 7860
24
 
25
  # Start the FastAPI server
 
1
  # Base image
2
+ FROM huggingface/transformers-pytorch-gpu:4.33.2
3
 
4
+ # Install system dependencies
 
5
  RUN apt-get update && apt-get install -y \
6
  libglib2.0-0 \
7
+ libgl1-mesa-glx \
8
+ libgthread-2.0-0 \
 
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Set the working directory
12
  WORKDIR /app
13
 
14
+ # Copy the project files
15
  COPY . /app
16
 
17
  # Install Python dependencies
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
+ # Expose the port (matching your app configuration)
21
  EXPOSE 7860
22
 
23
  # Start the FastAPI server