Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +1 -14
Dockerfile
CHANGED
@@ -3,27 +3,14 @@
|
|
3 |
|
4 |
FROM python:3.10
|
5 |
|
6 |
-
# Add a new user and set permissions
|
7 |
RUN useradd -m -u 1000 user
|
8 |
USER user
|
9 |
ENV PATH="/home/user/.local/bin:$PATH"
|
10 |
|
11 |
-
# Set environment variable to disable oneDNN and CUDA (if not needed)
|
12 |
-
ENV TF_ENABLE_ONEDNN_OPTS=0
|
13 |
-
ENV CUDA_VISIBLE_DEVICES=""
|
14 |
-
|
15 |
-
# Set the working directory
|
16 |
WORKDIR /app
|
17 |
|
18 |
-
# Copy requirements file and install dependencies
|
19 |
COPY --chown=user ./requirements.txt requirements.txt
|
20 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
21 |
|
22 |
-
# Copy the rest of the application files
|
23 |
COPY --chown=user . /app
|
24 |
-
|
25 |
-
# Expose the port the app will run on
|
26 |
-
EXPOSE 7860
|
27 |
-
|
28 |
-
# Command to run the application using uvicorn
|
29 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
3 |
|
4 |
FROM python:3.10
|
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 |
COPY --chown=user ./requirements.txt requirements.txt
|
13 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
14 |
|
|
|
15 |
COPY --chown=user . /app
|
16 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|