I'm trying to reproduce the code from this github:enter link description here. The purpose of this project is to use the GPU to perform some similarity search. Based on the instruction of the README file, I can now open the search server website inside the docker now. But I have tried many ways to try to open this server URL from an external browser, but all failed, can anyone help? Thanks!
Here is how I opened my server URL inside the Docker:
Download Docker Desktop.
Pull the images:
docker pull klorton/gpusimilarity:latest
From the docker directory(The docker file is inside the github), build:
docker build -t gpusim:internal .
Build a fingerprint file (Database), change PATH/TO/SMIGZ_DIR to your own path to the smi.gz file, change INPUT to your own smi.gz file.
docker run -v /PATH/TO/SMIGZ_DIR:/data -it gpusim python3 \
/gpusimilarity/bld/python/gpusim_createdb.py /data/INPUT.smi.gz \
/data/OUTPUT.fsim
Start a gpusimilarity server interactively, change /path/to/fsim/files to your own path to the fsim file.
docker run --net=host -v /path/to/fsim/files:/mnt/fsim -it \
klorton/gpusimilarity:latest python3 /gpusimilarity/bld/python/gpusim_server.py \
/mnt/fsim/OUTPUT.fsim --port 8080 --http_interface
The server will say "Ready for search" at this moment. Something like this:
enter image description here
7.The server is running now. In the README file, the author said that we can just use the following link: http://localhost:8080 to open it. But I failed by doing this.
Then I tried to open the URL inside the Docker, install w3m first.
apt-get install -y w3m
Open the URL inside the Docker:
w3m http://localhost:8080
It shows like this:
enter image description here
Can someone tell me how to open this URL outside of Docker? Thanks a lot!
I have tried many of the methods available on Google, But most of them don't work...
I solved this. Just Downgrade docker and run the same process by linux.
Related
I have Ubuntu 20.04, Mozilla Firefox 87.0, Google Chrome 89.0.4389.90.
I am trying to run the Docker Getting-started tutorial. I read a couple of posts from stack overflow to not avail. Also I checked this ToDo App (localhost:3000) shows no UI in Browser #9 and this enter link description here again to not avail. I do,
sudo docker build -t getting-started .
sudo docker run -dp 3000:3000 getting-started
and then when I go to http://localhost:3000 I get,
In Firefox,
in Chrome the following images alternate,
When I run, sudo docker ps -a I get,
Finally, do you suggest any Docker tutorial for beginners? I want to have enough understanding for Docker so that I can write scripts to manage docker images.
You might be building and running the Dockerfile outside the "app" directory which has this behaviour. As the tutorial says, first go to the app directory, create a Dockerfile there and then build and run. This should work.
3000:80 opens the tutorial because the default Dockerfile builds the docker/getting-started which is the tutorial.
Might be the problem something is blocking the port on your machine so try to Replace the port to 80 instead of 3000.
Change from
docker run -dp 3000:3000 getting-started
to
docker run -dp 3000:80 getting-started
and then open browser and hit http://localhost:3000
Answer 1 is correct but I would like to give a little explanation as to why you have to change "3000:3000" to "3000:80".
The port number before the colon represents the outgoing port and the port number after the colon represents the internal port inside the docker container.
"As the tutorial says, first go to the app directory, create a Dockerfile there and then build and run."
This solves the problem. If you build and run from the root - there is existing Dockerfile in there, it want work. Go to app folder, create Dockerfile with the content from the tutorial, build and run.
I am trying to get the Superset running on ubuntu server. I have referenced the steps from Superset page as below:
git clone https://github.com/apache/incubator-superset/
cd incubator-superset/contrib/docker
# prefix with SUPERSET_LOAD_EXAMPLES=yes to load examples:
docker-compose run --rm superset ./docker-init.sh
# you can run this command everytime you need to start superset now:
docker-compose up
I have fixed the initial issues around right version of docker-compose and postgress address bind issue on port 5432. So after fixing those my docker compose run command
docker-compose run --rm superset ./docker-init.sh
works fine and it asks me to set up a user name and password.
Finally to get the container running I run the final command
docker-compose up.
On my mac, it would run redis, postrgre container and then give me a localhost:8088 for me to get access to Superset UI with login info.
However on Ubuntu, when I run that, I first get this:
So looks it is running redis and postgres containers fine.
But then it is giving me Permission denied errors to create some mkdir directory.
Pls note I am running it as root user.
Also, my docker compose version is fine with 1.23.2 and my docker along with docker-compose is installed under
/usr/bin/docker and not /usr/local/bin/docker.
But I think that shouldn't be an issue.
Any help where it is going wrong and how can I fix it?
Thanks
Edit:
Ok I looked at the same issue mentioned on Github. And used a suggestion of using it only for Production and not development in docker-compose.yml file.
It seems to not throw the same error now when I do
docker-compose up.
However when I open localhost:8088 it does not connect to the UI.
try this:
mkdir ../../assets
chmod -R 777 ../../superset/assets/
as set in docker-compose.yml#L64, it is using ../../superset as volume when in develop. However the container does not have any permission in the host so the solution is to make a directory by yourself and grant the necessary permissions on to it.
I fellow the instruction from official Akeneo Doc. I try to get API connection list.
php bin/console pim:oauth-server:list-clients --env=prod
Every time I run this command in terminal, it throws error.
Could not open input file: bin/console
I tried for both version 1.7 and 2.0. It's still same.
Do i need to open terminal in certain folder to run?
Akeneo Server is on docker.
First I find Id of my container (for me, it's Akeneo)
docker container ls
my Akeneo Id on docker is
"0de07xxxxxxx"
I exac my container my this command
docker exec -it "0de07xxxxxxx" bash
and I find my path folder by find command.
find / -name app
Now i can run php command to get api connection list.
and yeah i do need to open terminal in akeneo folder to run php command lines.
I'm new to Docker and currently following this tutorial:
Learn Docker in 12 minutes
I created the necessary files and I made it up to display "Hello World!" on localhost:80.
Beyond that point, I tried to mount the container using the direct reference to my folder so I can update the index.php file to mimic the development evironment, and then I come with this error:
All I did is change the way the image is ran so I can update the content of the index.php file and see the changes reflect in the webpage when I hit F5.
Currently using Docker for Windows on Windows 10 Pro
Docker for Windows is running
I followed every steps scrupulously so I don't get myself fooled and it didn't work for me it seems.
To answer Mornor's question, here is the result for docker ps
And here for docker logs [container-name]
And since I now better understand what happens under the hood, how do I go to solve my problem illustrated in the log?
Here is my Dockfile
And the command I executed to run my image:
docker run -p 80:80 -v /wmi/tutorials/docker/src/:/var/www/html/ hello-world
And so you see that the file exists:
Error is coming from Apache which tries to show you the directory contents as there is no index file available. Either your docker mapping is not working correctly, or your apache does not have php support installed on it. You are accessing http://localhost, try http://localhost/index.php.
If you get same error, problem is with mapping. If you get php code the problem is with missing PHP support in Apache.
I think you're wrongly mouting your index.php. What you could do to debug it, is to firstly check if the index.php is indeed mounted within the container.
You could issue the following command :
docker run -p 80:80 -v /wmi/tutorials/docker/src/:/var/www/html/ hello-world bash -c 'ls -lsh /var/www/html/'
(use sh instead of bash if it does not work). If you can indeed see a index.php, then congratulations your file is correctly mounted, and the error is not coming from Docker, but from Apache.
If index.php is not there, then you have to check your Dockerfile. You mount src/, check if /src is in the same directory as your Dockerfile.
Keep us updated :)
I know the answer is late but the answer is very easy:
this happens When using docker and you have SELinux, be aware that the host has no knowledge of container SELinux policy.
by adding z
docker run -p 80:80 -v /wmi/tutorials/docker/src/:/var/www/html/:z hello-world
this will automatically do the chcon .... that you need to do.
Check whether the html folder has the proper permission or not.
Thank you
I've searched for a number of hours to find the answer to this because I want to respect the idea of non-redundant posts. I'm sure the fact that I'm relatively new to programming doesn't help but here's my issue (hopefully I present it in the correct way):
I am taking a Computational Finance class that requires the package 'qstk'. There is a docker image setup with everything needed for the course, under the docker file 'ruippeixotog/qstk'. I followed the following instructions to access this docker file via the Jupiter notebook and was successful but ever since that first use of the file, I can no longer access the notebook.
I have the current version of Docker downloaded and follow the same instructions to access the notebook via a web browser (I've tried Safari, Chrome, and Firefox) but always get the error code "
install docker whatever OS you have (it officially supports Windows,
Mac, Linux) by following the instructions on the Docker website start
it, still following the instructions on the website
List item
execute on command line: docker run -dt -p 8888:8888 --name qstk
ruippeixotog/qstk
open your browser at http://localhost:8888 and you have a python
interpreter with QSTK fully configured
The source repository is at: https://github.com/ruippeixotog/docker-qstk
My process:
I run docker with: docker run -dt -p 8888:8888 --name qstk ruippeixotog/qstk
I go to http://localhost:8888
And I get the response from the browser: "Failed to open page...server unexpectedly dropped the connection"
If I run:
I run docker with: docker run -dt -p 8888:8888 --name qstk ruippeixotog/qstk
jupyter notebook
It brings me to my tree of file folders (localhost:8888/tree), where the two files
"QSTK-0.2.5.tar.gz" and
"QSTK-0.2.5.tar.gz.cpgz"
Are located, along with a bunch of my other folders. When I try to edit the first of those two files, it opens a new tab and tells me "SSL is required." within the jupyter editor page for that file, showing nothing else
When I try to edit the second, it shows only "Error! /Users/.../QSTK-0.2.8
Can anyone help with this?