ishworrsubedii commited on
Commit
a22287e
·
1 Parent(s): 7f8082a

update: dockerfile-imagemagick

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -0
Dockerfile CHANGED
@@ -2,16 +2,25 @@ FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
 
5
  RUN chmod 777 /app
6
 
 
7
  RUN apt-get update && apt-get install -y \
8
  ffmpeg \
 
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
11
  COPY requirements.txt ./
12
 
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
 
15
  COPY . .
16
 
 
 
 
 
17
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Give write permissions to the app directory
6
  RUN chmod 777 /app
7
 
8
+ # Update and install necessary packages including ffmpeg and imagemagick
9
  RUN apt-get update && apt-get install -y \
10
  ffmpeg \
11
+ imagemagick \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Copy requirements.txt and install dependencies
15
  COPY requirements.txt ./
16
 
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
+ # Copy all the files from the current directory to the container
20
  COPY . .
21
 
22
+ # Set the environment variable for ImageMagick (if necessary)
23
+ # Replace with the correct path if needed, for example:
24
+ # ENV MAGICK_HOME=/usr/local/ ImageMagick_BINARY=/usr/local/bin/convert
25
+
26
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]