Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- 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
|
14 |
-
RUN pip install
|
|
|
15 |
|
16 |
# Set the TRANSFORMERS_CACHE environment variable
|
17 |
-
ENV
|
18 |
ENV FILES /temp_files
|
19 |
|
20 |
# Create the cache directory and adjust permissions
|
21 |
-
RUN mkdir -p $
|
22 |
-
&& chmod -R 777 $
|
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
|