astro21 commited on
Commit
2c4a5b7
1 Parent(s): f757e43

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -5
Dockerfile CHANGED
@@ -6,20 +6,25 @@ WORKDIR /code
6
 
7
  # Copy the requirements file into the container
8
  COPY ./requirements.txt /code/requirements.txt
 
 
 
9
 
10
  # Install any needed dependencies
 
11
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
 
13
- # Install gradio
14
- RUN pip install gradio
 
15
 
16
  # Set the TRANSFORMERS_CACHE environment variable
17
- ENV TRANSFORMERS_CACHE /temp
18
  ENV FILES /temp_files
19
 
20
  # Create the cache directory and adjust permissions
21
- RUN mkdir -p $TRANSFORMERS_CACHE \
22
- && chmod -R 777 $TRANSFORMERS_CACHE
23
 
24
  RUN mkdir -p $FILES \
25
  && chmod -R 777 $FILES
 
6
 
7
  # Copy the requirements file into the container
8
  COPY ./requirements.txt /code/requirements.txt
9
+ COPY ./packages.txt /code/packages.txt
10
+
11
+
12
 
13
  # Install any needed dependencies
14
+ RUN apt-get update && apt-get install -y sudo $(cat packages.txt)
15
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
16
 
17
+ # Install fastapi
18
+ RUN pip install fastapi
19
+ RUN pip install "uvicorn[standard]"
20
 
21
  # Set the TRANSFORMERS_CACHE environment variable
22
+ ENV TEMP_FILES /temp
23
  ENV FILES /temp_files
24
 
25
  # Create the cache directory and adjust permissions
26
+ RUN mkdir -p $TEMP_FILES \
27
+ && chmod -R 777 $TEMP_FILES
28
 
29
  RUN mkdir -p $FILES \
30
  && chmod -R 777 $FILES