Update Dockerfile
Browse files- Dockerfile +3 -11
Dockerfile
CHANGED
|
@@ -1,22 +1,14 @@
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
-
# Create non-root user
|
| 4 |
-
RUN useradd -m -u 1000 user
|
| 5 |
-
USER user
|
| 6 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
| 7 |
-
|
| 8 |
# Set working directory
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
# Clone the FastSD CPU repository
|
| 12 |
RUN git clone https://github.com/rupeshs/fastsdcpu.git .
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
RUN
|
| 16 |
-
|
| 17 |
-
pip install --upgrade pip && \
|
| 18 |
-
pip install torch==2.2.2 --index-url https://download.pytorch.org/whl/cpu && \
|
| 19 |
-
pip install -r requirements.txt
|
| 20 |
|
| 21 |
# Expose port for FastAPI server
|
| 22 |
EXPOSE 8000
|
|
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
# Set working directory
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
# Clone the FastSD CPU repository
|
| 7 |
RUN git clone https://github.com/rupeshs/fastsdcpu.git .
|
| 8 |
|
| 9 |
+
# Upgrade pip and install dependencies
|
| 10 |
+
RUN pip install --upgrade pip
|
| 11 |
+
RUN pip install -r requirements.txt
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
# Expose port for FastAPI server
|
| 14 |
EXPOSE 8000
|