Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +5 -18
Dockerfile
CHANGED
@@ -1,28 +1,15 @@
|
|
1 |
# Use the official Python 3.10.4 image
|
2 |
FROM python:3.10.4
|
3 |
|
|
|
|
|
|
|
4 |
# Install OS Libs
|
5 |
RUN apt-get update \
|
6 |
&& apt-get -y install ffmpeg
|
7 |
|
8 |
-
RUN useradd -m -u 1000 user
|
9 |
-
USER user
|
10 |
-
ENV HOME=/home/user \
|
11 |
-
PATH=/home/user/.local/bin:$PATH
|
12 |
-
|
13 |
-
# Copy the current directory contents into the container at .
|
14 |
-
COPY --chown=user ./backend $HOME/backend
|
15 |
-
|
16 |
-
# Change to backend as working directory
|
17 |
-
WORKDIR $HOME/backend
|
18 |
-
|
19 |
-
RUN mkdir $HOME/.cache
|
20 |
-
|
21 |
-
# Copy the current directory contents into the container at .
|
22 |
-
# COPY . .
|
23 |
-
|
24 |
# Change to backend as working directory
|
25 |
-
|
26 |
|
27 |
# Install requirements.txt
|
28 |
RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
|
@@ -36,4 +23,4 @@ RUN pip install pydantic[email]
|
|
36 |
|
37 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
38 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
39 |
-
# CMD ["gunicorn", "-b", "0.0.0.0:7860","main:app","--workers","1","-k","uvicorn.workers.UvicornWorker"]
|
|
|
1 |
# Use the official Python 3.10.4 image
|
2 |
FROM python:3.10.4
|
3 |
|
4 |
+
# Copy the current directory contents into the container at .
|
5 |
+
COPY . .
|
6 |
+
|
7 |
# Install OS Libs
|
8 |
RUN apt-get update \
|
9 |
&& apt-get -y install ffmpeg
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
# Change to backend as working directory
|
12 |
+
WORKDIR backend/
|
13 |
|
14 |
# Install requirements.txt
|
15 |
RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
|
|
|
23 |
|
24 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
25 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
26 |
+
# CMD ["gunicorn", "-b", "0.0.0.0:7860","main:app","--workers","1","-k","uvicorn.workers.UvicornWorker"]
|