Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +13 -12
Dockerfile
CHANGED
@@ -1,18 +1,19 @@
|
|
1 |
-
|
2 |
-
# you will also find guides on how best to write your Dockerfile
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
RUN useradd -m -u 1000 user
|
7 |
-
USER user
|
8 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
9 |
|
|
|
10 |
WORKDIR /app
|
11 |
|
12 |
-
|
|
|
|
|
|
|
|
|
13 |
|
14 |
-
|
15 |
-
|
16 |
|
17 |
-
|
18 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "
|
|
|
1 |
+
FROM ubuntu:20.04
|
|
|
2 |
|
3 |
+
# Install Python and system dependencies
|
4 |
+
RUN apt-get update && apt-get install -y python3 python3-pip ffmpeg && apt-get clean
|
|
|
|
|
|
|
5 |
|
6 |
+
# Set working directory
|
7 |
WORKDIR /app
|
8 |
|
9 |
+
# Copy application files
|
10 |
+
COPY . /app
|
11 |
+
|
12 |
+
# Install Python dependencies
|
13 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
14 |
|
15 |
+
# Expose the application port
|
16 |
+
EXPOSE 8000
|
17 |
|
18 |
+
# Command to run the application
|
19 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|