Spaces:
Sleeping
Sleeping
Upload 3 files
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
@@ -6,7 +6,7 @@ RUN useradd -m -u 1000 user
|
|
6 |
# Set environment variables for cache
|
7 |
ENV HF_HOME=/home/user/cache
|
8 |
|
9 |
-
#
|
10 |
USER user
|
11 |
WORKDIR /home/user/app
|
12 |
|
@@ -16,8 +16,8 @@ RUN mkdir -p /home/user/cache && chmod -R 777 /home/user/cache
|
|
16 |
# Copy application files with ownership set to the new user
|
17 |
COPY --chown=user . /home/user/app
|
18 |
|
19 |
-
# Install Python dependencies
|
20 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
21 |
|
22 |
# Expose the application port
|
23 |
EXPOSE 7860
|
|
|
6 |
# Set environment variables for cache
|
7 |
ENV HF_HOME=/home/user/cache
|
8 |
|
9 |
+
# Switch to the new user
|
10 |
USER user
|
11 |
WORKDIR /home/user/app
|
12 |
|
|
|
16 |
# Copy application files with ownership set to the new user
|
17 |
COPY --chown=user . /home/user/app
|
18 |
|
19 |
+
# Install Python dependencies, including uvicorn
|
20 |
+
RUN pip install --no-cache-dir -r requirements.txt uvicorn
|
21 |
|
22 |
# Expose the application port
|
23 |
EXPOSE 7860
|