Spaces:
Sleeping
Sleeping
neuralleap
commited on
Commit
•
5eae5c5
1
Parent(s):
7e45db4
Update Dockerfile
Browse files- Dockerfile +8 -2
Dockerfile
CHANGED
@@ -7,7 +7,12 @@ WORKDIR /code
|
|
7 |
# Copy the current directory contents into the container at /code
|
8 |
COPY ./requirements.txt /code/requirements.txt
|
9 |
|
10 |
-
# Install requirements.txt
|
|
|
|
|
|
|
|
|
|
|
11 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
12 |
|
13 |
# Set up a new user named "user" with user ID 1000
|
@@ -24,4 +29,5 @@ WORKDIR $HOME/app
|
|
24 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
25 |
COPY --chown=user . $HOME/app
|
26 |
|
27 |
-
|
|
|
|
7 |
# Copy the current directory contents into the container at /code
|
8 |
COPY ./requirements.txt /code/requirements.txt
|
9 |
|
10 |
+
# Install ffmpeg and requirements.txt
|
11 |
+
# Switch back to root to install packages
|
12 |
+
USER root
|
13 |
+
RUN apt-get update && apt-get install -y \
|
14 |
+
ffmpeg \
|
15 |
+
&& rm -rf /var/lib/apt/lists/*
|
16 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
17 |
|
18 |
# Set up a new user named "user" with user ID 1000
|
|
|
29 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
30 |
COPY --chown=user . $HOME/app
|
31 |
|
32 |
+
|
33 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860","--workers","4"]
|