Spaces:
Building
Building
Update Dockerfile
Browse files- Dockerfile +9 -11
Dockerfile
CHANGED
@@ -1,25 +1,23 @@
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
-
# Create a non-root user
|
4 |
RUN useradd -m -u 1000 user
|
5 |
USER user
|
6 |
WORKDIR /home/user
|
7 |
|
8 |
ENV PATH="/home/user/.local/bin:$PATH"
|
9 |
|
10 |
-
# Copy your code
|
11 |
COPY --chown=user . .
|
12 |
-
|
13 |
-
# Install dependencies
|
14 |
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
15 |
RUN pip install --no-cache-dir -e .
|
16 |
|
17 |
-
#
|
18 |
-
RUN mkdir -p /home/torchserve/model-store
|
19 |
-
RUN wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_detector.mar -P /home/torchserve/model-store/
|
20 |
-
RUN wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_pose_estimator.mar -P /home/torchserve/model-store/
|
21 |
|
22 |
-
#
|
23 |
-
|
24 |
|
25 |
-
|
|
|
|
1 |
FROM python:3.9
|
2 |
|
|
|
3 |
RUN useradd -m -u 1000 user
|
4 |
USER user
|
5 |
WORKDIR /home/user
|
6 |
|
7 |
ENV PATH="/home/user/.local/bin:$PATH"
|
8 |
|
9 |
+
# Copy your code and install dependencies
|
10 |
COPY --chown=user . .
|
|
|
|
|
11 |
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
12 |
RUN pip install --no-cache-dir -e .
|
13 |
|
14 |
+
# Create model-store directory inside user's home directory
|
15 |
+
RUN mkdir -p /home/user/torchserve/model-store
|
16 |
+
RUN wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_detector.mar -P /home/user/torchserve/model-store/
|
17 |
+
RUN wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_pose_estimator.mar -P /home/user/torchserve/model-store/
|
18 |
|
19 |
+
# Update config.properties if needed, or copy it here:
|
20 |
+
COPY config.properties /home/user/torchserve/config.properties
|
21 |
|
22 |
+
EXPOSE 7860
|
23 |
+
CMD ["python", "app.py"]
|