Create Dockerfile
Browse files- Dockerfile +28 -0
Dockerfile
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM intelligencenoborders/scinobo-raa:v0.1.0
|
| 2 |
+
|
| 3 |
+
# Copy files
|
| 4 |
+
COPY download_model.py /app
|
| 5 |
+
|
| 6 |
+
RUN useradd -m -u 1000 user
|
| 7 |
+
RUN chown -R user /app
|
| 8 |
+
USER user
|
| 9 |
+
ENV HOME=/home/user \
|
| 10 |
+
PATH=/home/user/.local/bin:$PATH
|
| 11 |
+
|
| 12 |
+
# Run the download
|
| 13 |
+
RUN python /app/download_model.py
|
| 14 |
+
|
| 15 |
+
# Set the working directory in the container
|
| 16 |
+
WORKDIR /app/src
|
| 17 |
+
|
| 18 |
+
# Expose the port that Gradio will run on
|
| 19 |
+
EXPOSE 7860
|
| 20 |
+
|
| 21 |
+
ENV PYTHONUNBUFFERED=1 \
|
| 22 |
+
GRADIO_ALLOW_FLAGGING=never \
|
| 23 |
+
GRADIO_NUM_PORTS=1 \
|
| 24 |
+
GRADIO_SERVER_NAME=0.0.0.0 \
|
| 25 |
+
SYSTEM=spaces
|
| 26 |
+
|
| 27 |
+
# Run app.py when the container launches
|
| 28 |
+
CMD ["python", "-m", "raa.server.gradio_app"]
|